Open sandboxFocus

Class EventLevelAspect

In Metalama, use EventAspect.

Namespace: PostSharp.Aspects
Assembly: Metalama.Migration.dll
Syntax
[MulticastAttributeUsage(MulticastTargets.Event, AllowMultiple = true)]
[AttributeUsage(AttributeTargets.Assembly|AttributeTargets.Class|AttributeTargets.Event, AllowMultiple = true, Inherited = false)]
[Obsolete("In Metalama, use 'EventAspect'.", false)]
public abstract class EventLevelAspect : Aspect, IEventLevelAspect, IAspect, IEventLevelAspectBuildSemantics, IAspectBuildSemantics, IValidableAnnotation

Constructors

Name Description
EventLevelAspect()

Methods

Name Description
CompileTimeInitialize(EventInfo, 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(EventInfo)

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

RuntimeInitialize(EventInfo)

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

SetAspectConfiguration(AspectConfiguration, object)

Not supported in Metalama.

SetAspectConfiguration(AspectConfiguration, EventInfo)

Not supported in Metalama.

Extension Methods