ICommand<>

Represents a command.

Represents a command.

Methods

public Task<int> ExecuteAsync(CommandContext context, TSettings settings, CancellationToken cancellationToken)

Executes the command.

Parameters:

context (CommandContext)
The command context.
settings (TSettings)
The settings.
cancellationToken (CancellationToken)
A CancellationToken that can be used to abort the command.

Returns:

An integer indicating whether the command executed successfully.

public Task<int> ExecuteAsync(CommandContext context, CommandSettings settings, CancellationToken cancellationToken)

Executes the command.

Parameters:

context (CommandContext)
The command context.
settings (CommandSettings)
The settings.
cancellationToken (CancellationToken)
A CancellationToken that can be used to abort the command.

Returns:

The validation result.