Interface IEventHandler<TEvent>
interface to be implemented by event handlers
Namespace: FastEndpoints
Assembly: FastEndpoints.Messaging.Core.dll
Syntax
public interface IEventHandler<in TEvent> : IEventHandler
Type Parameters
| Name | Description |
|---|---|
| TEvent | the type of the event model to be handled by this event handler |
Methods
HandleAsync(TEvent, CancellationToken)
the handler logic for the event handler
Declaration
Task HandleAsync(TEvent eventModel, CancellationToken ct)
Parameters
| Type | Name | Description |
|---|---|---|
| TEvent | eventModel | the input event model |
| CancellationToken | ct | optional cancellation token |
Returns
| Type | Description |
|---|---|
| Task |