Declares that the aspect class or advice to which this custom attribute is applied is exempt from a given effect.
Namespace: PostSharp.Aspects.Dependencies
Assembly: PostSharp.dll
Syntax
[AttributeUsage(AttributeTargets.Class|AttributeTargets.Method)]
public sealed class WaiveAspectEffectAttribute : AttributeRemarks
See AspectEffectDependencyAttribute for details about effects.
The weaver attributes effects to an aspect from the kind of the aspect, not from what its code actually does. Waive an effect that the aspect does not have, for example ChangeControlFlow on an aspect that defers the execution of a method without skipping it, so that dependencies on this effect no longer match the aspect. When you use the parameterless constructor on an aspect class, the aspect has no effect at all, and the weaver considers it commutative with any other aspect.
Constructors
| Name | Description |
|---|---|
| WaiveAspectEffectAttribute() | Initializes a new instance of the WaiveAspectEffectAttribute class and declares that the aspect class or advice to which this custom attribute is applied has no effect at all. |
| WaiveAspectEffectAttribute(params string[]) | Initializes a new instance of the WaiveAspectEffectAttribute class and declares that the aspect class or advice to which this custom attribute is applied is exempt from the specified effects. |
Properties
| Name | Description |
|---|---|
| Effects | Gets the list of effects from which the aspect class or advice to which this custom attribute is applied is guaranteed to be exempt. |