Class RDCoreNotificationHandler<TNotification>
The base class for a platform protocol JSON-RPC notification.
public abstract class RDCoreNotificationHandler<TNotification> : IJsonRpcNotificationHandler<TNotification>, IRequestHandler<TNotification>, IRequestHandler<TNotification, Unit>, IJsonRpcHandler where TNotification : IRequest
Type Parameters
TNotificationA serializable type representing the notification parameters.
- Inheritance
-
RDCoreNotificationHandler<TNotification>
- Implements
-
IJsonRpcNotificationHandler<TNotification>IRequestHandler<TNotification>IRequestHandler<TNotification, Unit>
- Inherited Members
Remarks
A [Method] attribute must be specified on the implementing class to map the handler to a specific platform protocol notification.
Methods
Handle(TNotification, CancellationToken)
Handles a request
public Task<Unit> Handle(TNotification request, CancellationToken cancellationToken)
Parameters
requestTNotificationThe request
cancellationTokenCancellationTokenCancellation token
Returns
- Task<Unit>
Response from the request
HandleNotificationAsync(TNotification, CancellationToken)
protected abstract Task HandleNotificationAsync(TNotification request, CancellationToken token)
Parameters
requestTNotificationtokenCancellationToken