In PostSharp, this object exposed the run-time execution context to an event interception advice. However, in Metalama, advice do not execute at run time. Instead, advice are templates that generate run-time code. This run-time code does not need helper objects to represent the execution context.
Namespace: PostSharp.Aspects
Assembly: Metalama.Migration.dll
Syntax
[Obsolete("In PostSharp, this object exposed the run-time execution context to an event interception advice. However, in Metalama, advice do not execute at run time. Instead, advice are templates that generate run-time code. This run-time code does not need helper objects to represent the execution context.", false)]
public abstract class EventInterceptionArgs : AdviceArgsConstructors
| Name | Description |
|---|---|
| EventInterceptionArgs() |
Properties
| Name | Description |
|---|---|
| Arguments | Use meta.Target.Parameters. |
| Binding | Use IEvent.Add(IExpression), IEvent.Remove(IExpression) or IEvent.Raise(params IExpression[]) to generate run-time code that accesses the event. |
| Event | Use meta.Target.Event. If you need a run-time EventInfo. call ToEventInfo(). |
| Handler | Use the |
| ReturnValue | In PostSharp, gets the return value after ProceedInvokeHandler() has been called. In Metalama, ProceedInvokeHandler()
is not supported, however you can call the handler yourself (it is exposed as the |
Methods
| Name | Description |
|---|---|
| AddHandler(Delegate) | Use meta.Proceed() from the advice that overrides the event adder, or use IEvent.Add(IExpression). |
| InvokeHandler(Delegate, Arguments) | From OverrideInvoke(dynamic), change the parameter values
using meta.Target.Parameters. |
| ProceedAddHandler() | Use meta.Proceed() from the advice that overrides the event adder, or use IEvent.Add(IExpression). |
| ProceedInvokeHandler() | Use meta.Proceed() from the advice that overrides the event invoker. Invoking the invoker from another advice is not supported. |
| ProceedRemoveHandler() | Use meta.Proceed() from the advice that overrides the event remover, or use IEvent.Remove(IExpression). |
| RemoveHandler(Delegate) | Use meta.Proceed() from the advice that overrides the event remover, or use IEvent.Remove(IExpression). |