An empty interface that must be implemented by objects assigned to the AspectState property of the IAspectBuilder interface.
Namespace: Metalama.Framework.Aspects
Assembly: Metalama.Framework.dll
Syntax
[CompileTime]
public interface IAspectState : ICompileTimeSerializableRemarks
Writing aspect state: Set the AspectState property during BuildAspect(IAspectBuilder<T>) to store arbitrary data specific to the target declaration.
Reading aspect state: Access AspectState to read your own aspect's state (e.g., in later layers). To access predecessor aspect states, iterate through Predecessors, check Kind, and cast Instance to IAspectInstance before accessing its AspectState.
Serialization requirement: Aspect state must be compile-time serializable (via ICompileTimeSerializable) because it may be persisted across projects when aspects are inherited or affect downstream projects through reference validation.