Interface IEventListener<TEvent>
Represents an event that can be published and subscribed to in the event bus system.
public interface IEventListener<in TEvent> where TEvent : IEvent
Type Parameters
TEvent
The type of the event.
- Extension Methods
Methods
OnEventAsync(TEvent, CancellationToken)
Handles the event asynchronously.
ValueTask OnEventAsync(TEvent evt, CancellationToken ct = default)
Parameters
evt
TEventThe event to handle.
ct
CancellationTokenThe cancellation token to observe while handling the event.
Returns
- ValueTask
A task that represents the asynchronous operation.