mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-07-07 13:08:14 +08:00
Implemented AddAsyncDelegate
(#766)
This commit is contained in:
@ -35,6 +35,16 @@ public interface IConfigurator
|
||||
ICommandConfigurator AddDelegate<TSettings>(string name, Func<CommandContext, TSettings, int> func)
|
||||
where TSettings : CommandSettings;
|
||||
|
||||
/// <summary>
|
||||
/// Adds a command that executes an async delegate.
|
||||
/// </summary>
|
||||
/// <typeparam name="TSettings">The command setting type.</typeparam>
|
||||
/// <param name="name">The name of the command.</param>
|
||||
/// <param name="func">The delegate to execute as part of command execution.</param>
|
||||
/// <returns>A command configurator that can be used to configure the command further.</returns>
|
||||
ICommandConfigurator AddAsyncDelegate<TSettings>(string name, Func<CommandContext, TSettings, Task<int>> func)
|
||||
where TSettings : CommandSettings;
|
||||
|
||||
/// <summary>
|
||||
/// Adds a command branch.
|
||||
/// </summary>
|
||||
|
Reference in New Issue
Block a user