Table of Contents

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

context CommandContext

The command context containing execution information.

settings TCommandSettings

The settings to use for command execution.

cancellationToken CancellationToken

A 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>).