Open sandboxFocus

Namespace Metalama.Framework.Utilities

Classes

DurableAttribute

Declares that a type, a field, a property or a parameter is durable, that is, that it is safe to be held across compilations. An analyzer verifies the declaration and reports a warning when it does not hold.

DurableLazy<T>

A durable alternative to Lazy<T>, that is, one that is safe to be held across compilations. The factory delegate is released as soon as the value has been computed.

HiddenAttribute

Specifies how the interface must be hidden by tools like our LinqPad adapter.

ImmutableTypeAttribute

Declares that a type must be written in an immutable style, and requires every type that derives from it or implements it to be written that way too. An analyzer verifies the declaration and reports a warning when it does not hold.

InternalImplementAttribute

A custom attribute that means that the interface cannot be implemented by another assembly than the one that declared it, except if the referencing assembly sees the internals of the declaring assembly.

PromiseExtensions

Extension methods for the IPromise<T> interface.

Promise<T>

Encapsulates value that must be defined later. Promises can used to to pass introduced declarations to templates as arguments when these declarations have not been introduced yet, resolving a chicken-or-egg situation. When objects of type IPromise are passed to a template, the template will automatically receive its resolved Value instead of the IPromise object.

Structs

DurableDangerous<T>

Wraps a value that is asserted to be durable, that is, safe to be held across compilations, without the assertion being verified. The analyzer treats this type as durable whatever T is.

Interfaces

IPromise

Encapsulates value that must be defined later. Promises can used to pass introduced declarations to templates as arguments when these declarations have not been introduced yet, resolving a chicken-or-egg situation. When objects of type IPromise are passed to a template, the template will automatically receive its resolved Value instead of the IPromise object. The Promise<T> class implements this interface.

IPromise<T>

Encapsulates value that must be defined later. Promises can used to pass introduced declarations to templates as arguments when these declarations have not been introduced yet, resolving a chicken-or-egg situation. When objects of type IPromise are passed to a template, the template will automatically receive its resolved Value instead of the IPromise object. The Promise<T> class implements this interface.