Open sandboxFocus

Class AspectConfiguration

Configuration of an IAspect.

Namespace: PostSharp.Aspects.Configuration
Assembly: PostSharp.dll
Syntax
public class AspectConfiguration
Remarks

Every concrete aspect class has a corresponding configuration class derived from AspectConfiguration.

The weaver gets the configuration of an aspect at build time, from two sources. Declaratively, from the configuration custom attribute (derived from AspectConfigurationAttribute) applied to the aspect class or to one of its base classes. Imperatively, from GetAspectConfiguration(object), which Aspect implements by calling configuration methods that you can override. A property set by the custom attribute takes precedence over the value provided imperatively. When the custom attribute sets the same property on several classes of the hierarchy, the value from the most derived class wins.

Constructors

Name Description
AspectConfiguration()

Properties

Name Description
AspectPriority

Gets or sets the aspect priority. Aspects with smaller priority are processed first. The default priority is zero.

Dependencies

Gets or sets the collection of dependencies.

SerializerType

Gets or sets the type of the serializer that will be used to serialize the current aspect.

UnsupportedTargetAction

Gets or sets the action to take when the aspect is applied to an unsupported target element.

See Also