Open sandboxFocus

Class AspectEffectDependencyAttribute

Specifies an aspect dependency that matches aspects or advices that have 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. This custom attribute lets you express dependencies on aspects according to their effect.

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

Constructors

Name Description
AspectEffectDependencyAttribute(AspectDependencyAction, AspectDependencyPosition, string)

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

AspectEffectDependencyAttribute(AspectDependencyAction, string)

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

Properties

Name Description
Effect

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

See Also