An IRef that stores only a string identifier and therefore does not keep the compilation it came
from in memory. Its IsDurable property is always true.
Namespace: Metalama.Framework.Code
Assembly: Metalama.Framework.dll
Syntax
[CompileTime]
[InternalImplement]
public interface IDurableRef : IRef, IEquatable<IRef>Remarks
Use this type in the signature of anything that stores a reference for longer than a single pipeline run: a field of a fabric, a field of an inheritable aspect, or a parameter of an API that keeps what it is given. The compiler then enforces what would otherwise only be a comment, because an ordinary IRef<T> obtained from ToRef() holds the compilation and cannot be converted implicitly.
Call ToDurableRef<T>(T) on a declaration or a type to obtain one, or ToDurable() when a reference is already at hand. Resolving a durable reference costs an identifier lookup, which is why references are not durable by default.