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

AspectEffectDependencyAttribute Class

Specifies an aspect dependency matching aspects or advices having a given effect.

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

All aspects (except the ones that have an empty implementation) have an effect on the program execution. The current custom attribute allows to express dependencies to aspects according to their effect.

The list of standard effects is given in class StandardEffects. All advices have implicitly the effect Custom. Most advices also have the effect ChangeControlFlow, because they are able to modify the control flow (for instance, skip the execution of the intercepted method or throwing an exception). An aspect or advice can declare it does not have a given effect by using the WaiveAspectEffectAttribute custom attribute.

Constructors

Name Description
AspectEffectDependencyAttribute(AspectDependencyAction, AspectDependencyPosition, String)

Initializes a new AspectEffectDependencyAttribute and specifies a position.

AspectEffectDependencyAttribute(AspectDependencyAction, String)

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

Properties

Name Description
Effect

Gets the effect that the aspects or advices must have in order to match the current dependency.

See Also