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