Custom attribute that, when applied on a method of an aspect class, specifies that this method is an advice that has the same semantics as OnInvoke(MethodInterceptionArgs).
Namespace: PostSharp.Aspects.Advices
Assembly: PostSharp.dll
Syntax
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true, Inherited = true)]
public sealed class OnMethodInvokeAdvice : OnMethodInvokeBaseAdviceRemarks
The method to which this custom attribute is applied must be public and must return void. It can be static.
Each parameter of the method receives a value of the target, selected by a custom attribute derived from
AdviceParameterAttribute, such as BindingAttribute, ArgumentsAttribute or ReturnValueAttribute.
Alternatively, the method can have the same signature as OnInvoke(MethodInterceptionArgs),
whose MethodInterceptionArgs parameter is allocated on each call. The MethodInterceptionArgs parameter can also be the first parameter,
followed by bound parameters.
Constructors
| Name | Description |
|---|---|
| OnMethodInvokeAdvice() |