AsyncCommandBaseRunAsync Method

Runs the command asynchronously.

Definition

Namespace: Ookii.CommandLine.Commands
Assembly: Ookii.CommandLine (in Ookii.CommandLine.dll) Version: 4.2.0+a4d3631e4dcc0970081ed435288efdebc1325f83
C#
public abstract Task<int> RunAsync()

Return Value

TaskInt32
A task that represents the asynchronous run operation. The result of the task is the exit code for the command.

Implements

IAsyncCommandRunAsync

Remarks

Typically, your application's Main() method should return the exit code of the command that was executed.

This method will only be invoked if you run commands with the CommandManagerRunCommandAsync method or one of its overloads. Typically, it's recommended to implement the ICommandRun method to invoke this method and wait for it. Use the AsyncCommandBase class for a default implementation that does this.

See Also