Class CommandHandler<TCommand>
inherit this base class if you'd like to manipulate validation state of the calling endpoint from within the command handler.
Inherited Members
Namespace: FastEndpoints
Assembly: FastEndpoints.dll
Syntax
public abstract class CommandHandler<TCommand> : CommandHandlerBase<TCommand>, ICommandHandler<TCommand>, ICommandHandler<TCommand, Void>, ICommandHandler where TCommand : ICommand
Type Parameters
| Name | Description |
|---|---|
| TCommand | the type of the command that will be handled by this command handler |
Methods
ExecuteAsync(TCommand, CancellationToken)
accepts a command and does not return a result.
Declaration
public abstract Task ExecuteAsync(TCommand command, CancellationToken ct = default)
Parameters
| Type | Name | Description |
|---|---|---|
| TCommand | command | the input command object |
| CancellationToken | ct | optional cancellation token |
Returns
| Type | Description |
|---|---|
| Task |