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
TRequestThe concrete command type.
- Extension Methods
Methods
HandleAsync(TRequest, CancellationToken)
Execute the handler.
Task HandleAsync(TRequest command, CancellationToken cancellationToken)
Parameters
commandTRequestThe dispatched command.
cancellationTokenCancellationTokenPropagated from the IMediator call site.