MetalamaAPI documentationPost­Sharp API migrationPost­Sharp.​AspectsEvent­Interception­Args
Open sandboxFocus

EventInterceptionArgs Class

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.

Inheritance
EventInterceptionArgs
Namespace: PostSharp.Aspects
Assembly: Metalama.Migration.dll
Syntax
public abstract class EventInterceptionArgs : AdviceArgs

Constructors

Name Description
EventInterceptionArgs()

Properties

Name Description
Arguments

In PostSharp, gets arguments in an OnInvokeHandler(EventInterceptionArgs) advice. In Metalama, this advice type is not supported.

Binding

Use IEvent. to generate run-time code that accesses the event.

Event

Use meta.Target.Event. If you need a run-time System.Reflection.EventInfo. call ToEventInfo().

Handler

Use the value parameter in the template.

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 value template parameter) and store the result in a local variable.

Methods

Name Description
AddHandler(Delegate)

Use meta.Proceed() from the advice that overrides the event adder, or use IEvent..

InvokeHandler(Delegate, Arguments)

Not supported in Metalama.

ProceedAddHandler()

Use meta.Proceed() from the advice that overrides the event adder, or use IEvent..

ProceedInvokeHandler()

Not supported in Metalama.

ProceedRemoveHandler()

Use meta.Proceed() from the advice that overrides the event remover, or use IEvent..

RemoveHandler(Delegate)

Use meta.Proceed() from the advice that overrides the event remover, or use IEvent..