Interface INotificationHandler<TNotification>
An interface for a notification handler
public interface INotificationHandler<in TNotification> where TNotification : INotification
Type Parameters
TNotification
The type of notification being handled
Remarks
There can be multiple handlers for a notification.
Methods
Handle(TNotification, CancellationToken)
Handles a notification of type TNotification
ValueTask Handle(TNotification notification, CancellationToken cancellationToken = default)
Parameters
notification
TNotificationThe notification being sent
cancellationToken
CancellationTokenCancellation token
Returns
- ValueTask
Awaitable task for notification operation