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

AspectRoleDependencyAttribute Class

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

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

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

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


Name Description
AspectRoleDependencyAttribute(AspectDependencyAction, AspectDependencyPosition, String)

Initializes a new AspectRoleDependencyAttribute and specifies a position.

AspectRoleDependencyAttribute(AspectDependencyAction, String)

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


Name Description

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

See Also