ข้ามไปยังเนื้อหา

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>

TCommand

The command type handled by the contract.

TResult

The result type returned by the command.

Handles the supplied command.

ValueTask<TResult> HandleAsync(TCommand command, CancellationToken cancellationToken = default)

command TCommand

The command to execute.

cancellationToken CancellationToken

The token that cancels the operation.

ValueTask<TResult>

A task that completes with the result produced by the command.