Open sandboxFocus

Class Aspect

The base aspect class in Metalama is Aspect.

Namespace: PostSharp.Aspects
Assembly: Metalama.Migration.dll
Syntax
[Obsolete("The base aspect class in Metalama is 'Aspect'.", false)]
public abstract class Aspect : MulticastAttribute, IAspect, IAspectBuildSemantics, IValidableAnnotation

Constructors

Name Description
Aspect()

Properties

Name Description
AspectPriority

It is not possible to set the aspect priority on a per-instance basis in Metalama. Instead, all aspects are statically ordered using the AspectOrderAttribute custom attribute.

SerializerType

Aspect are also serializable in Metalama, but the serializer cannot be customized.

UnsupportedTargetAction

In Metalama, it is not possible to customize the behavior when the aspect is applied to an unsupported target. An exception will be thrown.

Methods

Name Description
CompileTimeValidate(object)

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

CreateAspectConfiguration()

Not supported in Metalama.

GetAspectConfiguration(object)

Not supported in Metalama.

SetAspectConfiguration(AspectConfiguration, object)

Not supported in Metalama.