Open sandboxFocus

Class TypeLevelAspect

Namespace: PostSharp.Aspects
Assembly: Metalama.Migration.dll
Syntax
[MulticastAttributeUsage(MulticastTargets.Class|MulticastTargets.Struct|MulticastTargets.Interface, AllowMultiple = true, PersistMetaData = false)]
[AttributeUsage(AttributeTargets.Assembly|AttributeTargets.Class|AttributeTargets.Struct|AttributeTargets.Interface, AllowMultiple = true)]
public abstract class TypeLevelAspect : Aspect, ITypeLevelAspect, IAspect, ITypeLevelAspectBuildSemantics, IAspectBuildSemantics, IValidableAnnotation

Constructors

Name Description
TypeLevelAspect()

Methods

Name Description
CompileTimeInitialize(Type, AspectInfo)

In Metalama, aspect initialization is done in BuildAspect(IAspectBuilder<T>).

CompileTimeValidate(object)

In Metalama, validation is done in BuildEligibility(IEligibilityBuilder<T>) and BuildAspect(IAspectBuilder<T>). The equivalent of returning false is to call SkipAspect().

CompileTimeValidate(Type)

In Metalama, validation is done in BuildEligibility(IEligibilityBuilder<T>) and BuildAspect(IAspectBuilder<T>). The equivalent of returning false is to call SkipAspect().

RuntimeInitialize(Type)

In Metalama, add an initializer from the BuildAspect(IAspectBuilder<INamedType>) method by calling builder.Advice.AddInitializer(INamedType, string, InitializerKind, object?, object?).

SetAspectConfiguration(AspectConfiguration, object)

Not supported in Metalama.

SetAspectConfiguration(AspectConfiguration, Type)

Extension Methods