CliParserRunAsync(String, CancellationToken) Method

Parses a command line string value and runs the handler asynchronously for the indicated command.

Definition

Namespace: DotMake.CommandLine
Assembly: DotMake.CommandLine (in DotMake.CommandLine.dll) Version: 2.6.6
C#
public Task<int> RunAsync(
	string commandLine,
	CancellationToken cancellationToken = default
)

Parameters

commandLine  String
The command line string that will be split into tokens as if it had been passed on the command line. Useful for testing command line input by just specifying it as a single string.
cancellationToken  CancellationToken  (Optional)
The token to monitor for cancellation requests.

Return Value

TaskInt32
The exit code for the invocation.

See Also