Open sandboxFocus

Class TransitiveProjectFabric

A compile-time entry point that executes within the compiler and IDE to add aspects, configure libraries, and implement architecture rules for projects that reference the assembly containing this fabric. The fabric does not execute in the project where it is defined.

Inheritance
TransitiveProjectFabric
Namespace: Metalama.Framework.Fabrics
Assembly: Metalama.Framework.dll
Syntax
public abstract class TransitiveProjectFabric : ProjectFabric, ICompileTimeSerializable, ITemplateProvider
Remarks

Transitive project fabrics enable aspect library authors to automatically apply aspects and configuration to consuming projects. Unlike ProjectFabric, which only affects the project in which it is defined, a TransitiveProjectFabric applies transformations to any project that references the assembly containing the fabric.

The AmendProject(IProjectAmender) method is not executed in the current project where the fabric is defined. If you need to apply transformations to both the current project and referencing projects, create two separate fabric classes: one inheriting from ProjectFabric and another from TransitiveProjectFabric.

When multiple transitive project fabrics are present in the dependency graph, they are executed in the following order:

  1. Fabrics that are deepest in the dependency graph are executed first.
  2. Fabrics are then ordered by assembly name.
  3. Fabrics are ordered by source file location (closest to the root directory first).
  4. Finally, fabrics are ordered by type name.

Transitive project fabrics are commonly used to expose configuration APIs that can be consumed from fabrics in referencing projects.

Constructors

Name Description
TransitiveProjectFabric()

Extension Methods

See Also