AddAsyncDelegate<TSettings>(string, Func<CommandContext, TSettings, Task<int>>) Method
Adds a command that executes an async delegate.
ICommandConfigurator AddAsyncDelegate<TSettings>(string name, Func<CommandContext, TSettings, Task<int>> func)
where TSettings : CommandSettings
- Namespace
- Spectre
.Console .Cli - Containing Type
- IConfigurator
Parameters
-
TSettings
- The command setting type.
Parameters
- string name
- The name of the command.
-
Func
<CommandContext, TSettings, Task <int> > func - The delegate to execute as part of command execution.