Open sandboxFocus

Class AspectRoleDependencyAttribute

Specifies an aspect dependency that matches aspects or advices that are part of a given role.

Inheritance
AspectRoleDependencyAttribute
Namespace: PostSharp.Aspects.Dependencies
Assembly: PostSharp.dll
Syntax
public sealed class AspectRoleDependencyAttribute : AspectDependencyAttribute
Remarks

A role describes what the aspect does. A list of standard roles is available in the StandardRoles class. Aspect vendors are encouraged to enroll their aspects in one of these roles whenever it makes sense, and to document the other roles that they use.

An aspect or advice can be enrolled in a role by using the ProvideAspectRoleAttribute custom attribute.

Constructors

Name Description
AspectRoleDependencyAttribute(AspectDependencyAction, AspectDependencyPosition, string)

Initializes a new instance of the AspectRoleDependencyAttribute class and specifies a position.

AspectRoleDependencyAttribute(AspectDependencyAction, string)

Initializes a new instance of the AspectRoleDependencyAttribute class without specifying the position. The position is implicitly Any.

Properties

Name Description
Role

Gets the role that the aspects or advices must be part of in order to match the current dependency.

See Also