MethodImplementationAspect.OnInvoke Method |
Namespace: PostSharp.Aspects
Assembly: PostSharp (in PostSharp.dll) Version: 2023.0.3.0 (2023.0.3.0)
public abstract void OnInvoke( MethodInterceptionArgs args )
Parameters
- args
- Type: PostSharp.Aspects.MethodInterceptionArgs
Advice arguments.
Implements
IMethodInterceptionAspect.OnInvoke(MethodInterceptionArgs)The implementation of OnInvoke(MethodInterceptionArgs) may invoke Proceed(), may schedule it for invocation from another thread, or may completely skip its invocation. Alternatively, it may use Binding. Before returning to the caller, the OnInvoke(MethodInterceptionArgs) method must set the return value (property ReturnValue) and all output arguments (property Arguments), otherwise the target method may fail with a NullReferenceException. These are normally set by calling Proceed().