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

Adds a command without settings that executes an async delegate.
public static ICommandConfigurator AddAsyncDelegate<TSettings>(this IConfigurator<TSettings> configurator, string name, Func<CommandContext, Task<int>> func) 
    where TSettings : CommandSettings
Containing Type
ConfiguratorExtensions

Parameters

TSettings
The command setting type.

Parameters

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

Returns