MetalamaAPI documentationAspect APIMetalama.​Framework.​Code.​InvokersIEvent­Invoker
Open sandboxFocus

IEventInvoker Interface

Allows adding/removing delegates to/from events.

Namespace: Metalama.Framework.Code.Invokers
Assembly: Metalama.Framework.dll
Syntax
[CompileTime]
public interface IEventInvoker

Methods

Name Description
Add(Object)

Generates run-time code that adds a given handler to the event. By default, the target instance of the event is this unless the event is static, and the base implementation of the event is invoked, i.e. the implementation before the current aspect layer. To change the default values, or to use the ?. null-conditional operator, use the With(InvokerOptions) method.

Raise(Object[])

Generates run-time code that raises the current event with specified arguments. By default, the target instance of the event is this unless the event is static, and the base implementation of the event is invoked, i.e. the implementation before the current aspect layer. To change the default values, or to use the ?. null-conditional operator, use the With(InvokerOptions) method.

Remove(Object)

Generates run-time code that removes a given handler from the event. By default, the target instance of the event is this unless the event is static, and the base implementation of the event is invoked, i.e. the implementation before the current aspect layer. To change the default values, or to use the ?. null-conditional operator, use the With(InvokerOptions) method.

With(InvokerOptions)

Gets an IEventInvoker for the same event and target but with different options.

With(Object, InvokerOptions)

Gets an IEventInvoker for the same event but with a different target instance and optionally different options.