EventInterceptionArgs Class
Arguments of handlers of aspects of the type EventInterceptionAspect.
Inheritance Hierarchy
System.Object
  PostSharp.Aspects.AdviceArgs
    PostSharp.Aspects.EventInterceptionArgs

Namespace: PostSharp.Aspects
Assembly: PostSharp (in PostSharp.dll) Version: 4.3.30.0 (4.3.30.0)
Syntax
C#
public abstract class EventInterceptionArgs : AdviceArgs

The EventInterceptionArgs type exposes the following members.

Properties
  NameDescription
Public propertyArguments
Gets the delegate arguments.
Public propertyBinding
Gets an interface that allows to invoke the next node in the chain of invocation of the intercepted method.
Public propertyDeclarationIdentifier
Gets the DeclarationIdentifier of the declaration to which the advice has been applied.
(Inherited from AdviceArgs.)
Public propertyEvent
Gets the event to which the current aspect has been applied.
Public propertyHandler
Gets the delegate being added, removed, or invoked.
Public propertyInstance
Gets or sets the object instance on which the method is being executed.
(Inherited from AdviceArgs.)
Public propertyReturnValue
Gets the return value of the delegate.
Top
Methods
  NameDescription
Public methodAddHandler
Adds a handler to the event by invoking the Add semantic of the next node in the chain of invocation.
Public methodInvokeHandler
Invokes a handler by calling the Invoke semantic of the next node in the chain of invocation.
Public methodProceedAddHandler
Proceeds with adding the Delegate to the event to which the current aspect. This method invokes the next handler in chain. It is typically invoked from the implementation of OnAddHandler(EventInterceptionArgs).
Public methodProceedInvokeHandler
Proceeds with invoking the Delegate with the arguments specified in the Arguments property. The delegate may change the Arguments and set the ReturnValue. This method invokes the next handler in chain. It is typically invoked from the implementation of OnInvokeHandler(EventInterceptionArgs).
Public methodProceedRemoveHandler
Proceeds with removing the Delegate from the event to which the current aspect. This method invokes the next handler in chain. It is typically invoked from the implementation of OnRemoveHandler(EventInterceptionArgs).
Public methodRemoveHandler
Removes a handler from the event by invoking the Remove semantic of the next node in the chain of invocation.
Top
Extension Methods
  NameDescription
Public Extension MethodQueryInterface<T>
Gets the implementation of a specified interface for the specified object.
(Defined by QueryInterfaceExtensions.)
Top
Remarks
Note Note
As a result of weaving optimizations, instances of classes derived from AdviceArgs may be shared among different aspects. Therefore, aspect code should not attempt to access this object once the control has been given over to the next node in the chain of invocation. Consider working with aspect bindings if you need such deferred execution.
Note Note
Aspect weaving optimizations may also cause an advice parameter of this type to be seen null when inspecting it in a debugger. If you need to inspect the instance in runtime, consider disabling aspect optimizations in the debug build configuration.
See Also