Open sandboxFocus

Class DelegateEventAdapter<TDelegate, TArgs, TState>

An implementation of IEventAdapter<TDelegate, TArgs, TState> based on delegates.

Inheritance
DelegateEventAdapter<TDelegate, TArgs, TState>
Implements
IEventAdapter<TDelegate, TArgs, TState>
Namespace: Metalama.Framework.RunTime.Events
Assembly: Metalama.Framework.dll
Syntax
public sealed class DelegateEventAdapter<TDelegate, TArgs, TState> : IEventAdapter<TDelegate, TArgs, TState> where TDelegate : Delegate
Type Parameters
Name Description
TDelegate

The event delegate type.

TArgs

The event arguments type (i.e. the arguments of TDelegate packed as a tuple).

TState

An opaque state stored by the EventBroker<TDelegate, TArgs, TState> and passed along to delegates.

Constructors

Name Description
DelegateEventAdapter(EventHandlerInvocationCallback<TDelegate, TArgs, TState>, Func<EventBroker<TDelegate, TArgs, TState>, TDelegate>, Action<TDelegate, TState>, Action<TDelegate, TState>)

Extension Methods