MetalamaAPI documentationAspect APIMetalama.​Framework.​CodeDeclaration­Enhancements<T>
Open sandboxFocus

DeclarationEnhancements<T> Class

Gives access to the aspects, options and annotations on a declaration.

Inheritance
System.Object
DeclarationEnhancements<T>
Namespace: Metalama.Framework.Code
Assembly: Metalama.Framework.dll
Syntax
[CompileTime]
public sealed class DeclarationEnhancements<T> : ValueType where T : class, IDeclaration
Type Parameters
Name Description
T

Methods

Name Description
GetAnnotations<TAnnotation>()

Gets the list of annotations of a given type on the current declaration.

GetAspectInstances()

Gets the set of aspects (represented by their IAspectInstance) that have been applied to a specified declaration.

GetAspects<TAspect>()

Gets the set of instances of a specified type of aspects that have been applied to a specified declaration.

GetOptions<TOptions>()

Gets the options effective for the current declarations. Options provided by aspects through the IHierarchicalOptionsProvider are available only when and after the given aspect instance has been initialized; options provided by other means are available immediately.

HasAspect(Type)

Determines if the current declaration has at least one aspect of the given type.

HasAspect<TAspect>()

Determines if the current declaration has at least one aspect of the given type.