MethodInterceptionArgs Class |
Arguments of advices of aspect type MethodInterceptionAspect.

Namespace: PostSharp.Aspects
Assembly: PostSharp (in PostSharp.dll) Version: 5.0.55.0 (5.0.55.0)

C#
public abstract class MethodInterceptionArgs : AdviceArgs
The MethodInterceptionArgs type exposes the following members.

Name | Description | |
---|---|---|
![]() | Arguments |
Gets the list of arguments with which the method has been invoked.
|
![]() | AsyncBinding |
Gets an interface that allows to invoke asynchronously the next node in the chain of invocation of the intercepted method.
|
![]() | Binding |
Gets an interface that allows to invoke the next node in the chain of invocation of the intercepted method.
|
![]() | DeclarationIdentifier |
Gets the DeclarationIdentifier of the declaration to which the
advice has been applied.
(Inherited from AdviceArgs.) |
![]() | Instance |
Gets or sets the object instance on which the method is being executed.
(Inherited from AdviceArgs.) |
![]() | IsAsync |
Determines whether the intercepted method is async, and therefore whether the AsyncBinding property
and ProceedAsync() method are available.
|
![]() | Method |
Gets the method being executed.
|
![]() | ReturnValue |
Gets or sets the return value of the method.
|

Name | Description | |
---|---|---|
![]() | Invoke |
Invokes the method that has been intercepted by calling the next node in the chain of invocation with given arguments,
without affecting the property ReturnValue.
|
![]() | InvokeAsync |
Invokes asynchronously the method that has been intercepted by calling the next node in the chain of invocation with given arguments,
without affecting the property ReturnValue.
|
![]() | Proceed |
Proceeds with invocation of the method that has been intercepted by calling the next node in the chain of invocation,
passing the current Arguments to that method and
storing its return value into the property ReturnValue.
|
![]() | ProceedAsync |
Proceeds asynchronously with invocation of the method that has been intercepted by calling the next node in the chain of invocation,
passing the current Arguments to that method and
storing its return value into the property ReturnValue upon the completion of the intercepted async method.
|

Name | Description | |
---|---|---|
![]() | QueryInterface<T> |
Gets the implementation of a specified interface for the specified object.
(Defined by QueryInterfaceExtensions.) |

![]() |
---|
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. |
![]() |
---|
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. |
