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.

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

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.

Constructors

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.

Properties

Name Description
Role

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

See Also