AsyncCommandBaseRunAsync Method

Runs the command asynchronously.

Definition

Namespace: Ookii.CommandLine.Commands
Assembly: Ookii.CommandLine (in Ookii.CommandLine.dll) Version: 4.0.0+bb7ed9a8fdfd1cb21824750a8cf508863ad15086
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