Method DoExecuteAsync
- Namespace
- Ploch.CommandLine.UseCases
- Assembly
- Ploch.CommandLine.UseCases.dll
DoExecuteAsync(CommandContext, TCommandSettings, CancellationToken)
Runs the use case and renders its outcome, echoing the supplied settings first only when EchoSettings is true.
protected override Task<ExitCode> DoExecuteAsync(CommandContext context, TCommandSettings settings, CancellationToken cancellationToken)
Parameters
contextCommandContextThe command context containing execution information.
settingsTCommandSettingsThe settings to use for command execution.
cancellationTokenCancellationTokenA token forwarded to the use case so it can honour cancellation.
Returns
- Task<ExitCode>
The result of ProcessSuccessResponse(Result<TUseCaseResponse>) when the use case succeeds; otherwise the result of ProcessFailureResponse(Result<TUseCaseResponse>).