Table of Contents

Interface IClientCommandHandler<TRequest, TResponse>

Namespace
NLightning.Daemon.Interfaces
Assembly
NLightning.Daemon.dll
public interface IClientCommandHandler<TRequest, TResponse>

Type Parameters

TRequest
TResponse

Properties

Command

Gets the client command associated with the handler.

ClientCommand Command { get; }

Property Value

ClientCommand

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

request TRequest

The request object containing the necessary data to handle the command.

ct CancellationToken

A 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.