Interface IClientCommandHandler<TRequest, TResponse>
- Namespace
- NLightning.Daemon.Interfaces
- Assembly
- NLightning.Daemon.dll
public interface IClientCommandHandler<TRequest, TResponse>
Type Parameters
TRequestTResponse
Properties
Command
Gets the client command associated with the handler.
ClientCommand Command { get; }
Property Value
Remarks
This property returns a value from the ClientCommand enumeration,
representing the specific command handled by the implementing class.
Methods
HandleAsync(TRequest, CancellationToken)
Handles the execution of a client command asynchronously.
Task<TResponse> HandleAsync(TRequest request, CancellationToken ct)
Parameters
requestTRequestThe request object containing the necessary data to handle the command.
ctCancellationTokenA cancellation token that can be used to cancel the operation.
Returns
- Task<TResponse>
A task representing the asynchronous operation, containing the response of the command execution.