Skip to main content
Table of Contents

Interface ICommandHandler<TRequest>

Namespace
Stratara.Abstractions.Mediator
Assembly
Stratara.Abstractions.dll

Handler for a command that returns no result. Resolved by IMediator via DI; registered automatically by AddCommandHandlersFromAssemblyContaining<T>().

public interface ICommandHandler<in TRequest> where TRequest : IRequest

Type Parameters

TRequest

The concrete command type.

Extension Methods

Methods

HandleAsync(TRequest, CancellationToken)

Execute the handler.

Task HandleAsync(TRequest command, CancellationToken cancellationToken)

Parameters

command TRequest

The dispatched command.

cancellationToken CancellationToken

Propagated from the IMediator call site.

Returns

Task