AsynchronousCommandLineAction.InvokeAsync Method

Definition

Performs an action when the associated symbol is invoked on the command line.

public abstract System.Threading.Tasks.Task<int> InvokeAsync(System.CommandLine.ParseResult parseResult, System.Threading.CancellationToken cancellationToken = default);
abstract member InvokeAsync : System.CommandLine.ParseResult * System.Threading.CancellationToken -> System.Threading.Tasks.Task<int>
Public MustOverride Function InvokeAsync (parseResult As ParseResult, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Integer)

Parameters

parseResult
ParseResult

Provides the parse results.

cancellationToken
CancellationToken

The token to monitor for cancellation requests.

Returns

A value that can be used as the exit code for the process.

Applies to