Språk

ModelBindingCommandHandler.InvokeAsync(ParseResult, CancellationToken) Method

Definition

Binds values for the underlying user-defined method and uses them to invoke that method.

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

Parameters

parseResult
ParseResult

The current parse result.

cancellationToken
CancellationToken

A token that can be used to cancel the invocation.

Returns

A task whose value can be used to set the process exit code.

Applies to