MethodExecutionArgs Class
Arguments of advices of aspects of type OnMethodBoundaryAspect and OnExceptionAspect
Inheritance Hierarchy
System.Object
  PostSharp.Aspects.AdviceArgs
    PostSharp.Aspects.MethodExecutionArgs

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

The MethodExecutionArgs type exposes the following members.

Properties
  NameDescription
Public propertyArguments
Gets the arguments with which the method has been invoked.
Public propertyDeclarationIdentifier
Gets the DeclarationIdentifier of the declaration to which the advice has been applied.
(Inherited from AdviceArgs.)
Public propertyException
Gets the exception currently flying.
Public propertyFlowBehavior
Determines the control flow of the target method once the advice is exited.
Public propertyInstance
Gets or sets the object instance on which the method is being executed.
(Inherited from AdviceArgs.)
Public propertyMethod
Gets the method being executed.
Public propertyMethodExecutionTag
User-defined state information whose lifetime is linked to the current method execution. Aspects derived from IOnMethodBoundaryAspect should use this property to save state information between different events (OnEntry(MethodExecutionArgs), OnExit(MethodExecutionArgs) and OnException(MethodExecutionArgs)).
Public propertyReturnValue
Gets or sets the method return value.
Public propertyYieldValue
Gets or sets the value yielded by the iterator method.
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