Represents one link in the causality chain that led to an aspect being applied. Each predecessor describes what caused an aspect instance to be created (e.g., a custom attribute, a fabric, a parent aspect, or inheritance).
Namespace: Metalama.Framework.Aspects
Assembly: Metalama.Framework.dll
Syntax
[CompileTime]
public readonly struct AspectPredecessorRemarks
Aspect predecessors form a chain that tracks the provenance of aspect instances. This is primarily useful for:
- Parent-child communication: Child aspects can access parent aspect state via Predecessors
-
Introspection: Analyzing aspect composition and dependencies programmatically using the
Metalama.Framework.Introspectionnamespace
Use the Kind property to determine the type of predecessor, then cast Instance to the appropriate type: IAspectInstance, IFabricInstance, or IAttribute.
Properties
| Name | Description |
|---|---|
| Instance | Gets the object that created the aspect instance. It can be an IAspectInstance, an IFabricInstance, or an IAttribute. |
| Kind | Gets the kind of relationship represented by the current AspectPredecessor, and the kind of object present in the Instance property. |
Methods
| Name | Description |
|---|---|
| ToString() |