Interface ICommandHandler
เนื้อหานี้ยังไม่ได้แปลเป็นภาษาไทย แสดงเป็นภาษาอังกฤษแทน
Namespace: Cephalon.Abstractions.Data
Assembly: Cephalon.Abstractions.dll
Handles a write-side request that returns a result value.
public interface ICommandHandler<in TCommand, TResult> where TCommand : ICommand<TResult>Type Parameters
Section titled “Type Parameters”TCommand
The command type handled by the contract.
TResult
The result type returned by the command.
Methods
Section titled “Methods”HandleAsync(TCommand, CancellationToken)
Section titled “ HandleAsync(TCommand, CancellationToken)”Handles the supplied command.
ValueTask<TResult> HandleAsync(TCommand command, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”command TCommand
The command to execute.
cancellationToken CancellationToken
The token that cancels the operation.
Returns
Section titled “Returns”ValueTask<TResult>
A task that completes with the result produced by the command.