public Task<int?> RunCommandAsync(
string? commandName,
ReadOnlyMemory<string> args
)
Public Function RunCommandAsync (
commandName As String,
args As ReadOnlyMemory(Of String)
) As Task(Of Integer?)
Dim instance As CommandManager
Dim commandName As String
Dim args As ReadOnlyMemory(Of String)
Dim returnValue As Task(Of Integer?)
returnValue = instance.RunCommandAsync(commandName,
args)
public:
Task<Nullable<int>>^ RunCommandAsync(
String^ commandName,
ReadOnlyMemory<String^> args
)
This function creates the command by invoking the CreateCommand(String, ReadOnlyMemory<String>) method. If the command implements the IAsyncCancelableCommand interface, it sets the IAsyncCancelableCommand.CancellationToken property. If the command implements the IAsyncCommand interface, it invokes the IAsyncCommand.RunAsync() method; otherwise, it invokes the ICommand.Run() method on the command.
Commands that don't meet the criteria of the CommandOptions.CommandFilter predicate are not included.
If the CommandOptions.ParentCommand property is null, only commands without a ParentCommandAttribute attribute are included. If it is not null, only commands where the type specified using the ParentCommandAttribute attribute matches the value of the property are included.
The automatic version command is included if the CommandOptions.AutoVersionCommand property is true and the command name matches the name of the automatic version command, and not any other command name. The CommandOptions.CommandFilter and CommandOptions.ParentCommand property also affect whether the version command is included.