PostSharpAPI ReferencePost­Sharp.​Aspects.​DependenciesAspect­Dependency­Attribute
Open sandboxFocus

AspectDependencyAttribute Class

Base class for all custom attributes defining aspect dependencies. An aspect dependency determines the behavior of aspects or advices when used in conjunction with other aspects and advices. Aspect dependencies determine ordering, requirements, conflicts, and commutativity of aspects and advices.

Namespace: PostSharp.Aspects.Dependencies
Assembly: PostSharp.dll
Syntax
public abstract class AspectDependencyAttribute : Attribute

Constructors

Name Description
AspectDependencyAttribute(AspectDependencyAction)

Initializes a new AspectDependencyAttribute without specifying the position, implicitly set to Any.

AspectDependencyAttribute(AspectDependencyAction, AspectDependencyPosition)

Initializes a new AspectDependencyAttribute and specifies a position.

Properties

Name Description
Action

Gets the dependency action, i.e. the kind of relationship specified by the dependency (Order, Require, Conflict, or Commute).

IsWarning

If true, specifies that the constraint (of type Require or Conflict) should emit a warning instead of an error if not respected.

Position

Gets the position of the current dependency, i.e. actually the position of the other aspect or advices with respect to the one related to this dependency.

Target

Determines the target (Default or Type) to which the aspect dependency apply.

TargetType

Aspect type to which this dependency applies. This property is required when the custom attribute is applied at assembly level. It is ignored when applied on class or method level.

See Also