AddAsyncDelegate<TDerivedSettings>(string, Func<CommandContext, TDerivedSettings, Task<int>>) Method

Adds a command that executes an async delegate.
ICommandConfigurator AddAsyncDelegate<TDerivedSettings>(string name, Func<CommandContext, TDerivedSettings, Task<int>> func) 
    where TDerivedSettings : TSettings
Containing Type
IConfigurator<TSettings>

Parameters

TDerivedSettings
The derived command setting type.

Parameters

string name
The name of the command.
Func<CommandContext, TDerivedSettings, Task<int>> func
The delegate to execute as part of command execution.

Returns