AsynchronousCommandLineAction.InvokeAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.