Open sandboxFocus

Class BindingAttribute

Binds a parameter of an interception advice to the binding object, which invokes the next node in the chain of interceptions of the target.

Inheritance
BindingAttribute
Namespace: PostSharp.Aspects.Advices
Assembly: PostSharp.dll
Syntax
public sealed class BindingAttribute : AdviceParameterAttribute
Remarks

In OnLocationGetValueAdvice and OnLocationSetValueAdvice, the parameter receives the ILocationBinding<T> of the field or property; its type must be ILocationBinding<T>, ILocationBinding, or a type parameter of the advice method. In OnMethodInvokeAdvice, the parameter receives the method binding of the target method.

The binding object is a singleton, so binding it does not allocate memory. The parameter cannot be ref, in or out. This attribute can be used only in OnMethodInvokeAdvice, OnLocationGetValueAdvice and OnLocationSetValueAdvice.

Constructors

Name Description
BindingAttribute()

See Also