Skip to content

Interface ICommandHandler

Namespace: Cephalon.Abstractions.Data
Assembly: Cephalon.Abstractions.dll

Handles a write-side request that does not return a result value.

public interface ICommandHandler<in TCommand> where TCommand : ICommand

TCommand

The command type handled by the contract.

Handles the supplied command.

ValueTask HandleAsync(TCommand command, CancellationToken cancellationToken = default)

command TCommand

The command to execute.

cancellationToken CancellationToken

The token that cancels the operation.

ValueTask

A task that completes when the command has finished running.