IConfigurator<TSettings> Interface

Represents a configurator for specific settings.
public interface IConfigurator<in TSettings> where TSettings : CommandSettings

Parameters

TSettings
The command setting type.

Methods

abstract ICommandConfigurator AddAsyncDelegate<TDerivedSettings>(string, Func<CommandContext, TDerivedSettings, Task<int>>)
Adds a command that executes an async delegate.
abstract IBranchConfigurator AddBranch<TDerivedSettings>(string, Action<IConfigurator<TDerivedSettings>>)
Adds a command branch.
abstract ICommandConfigurator AddCommand<TCommand>(string)
Adds a command.
abstract ICommandConfigurator AddDelegate<TDerivedSettings>(string, Func<CommandContext, TDerivedSettings, int>)
Adds a command that executes a delegate.
abstract void AddExample(string[])
Adds an example of how to use the branch.
abstract void HideBranch()
Marks the branch as hidden. Hidden branches do not show up in help documentation or generated XML models.
abstract void SetDefaultCommand<TDefaultCommand>()
Adds a default command.
abstract void SetDescription(string)
Sets the description of the branch.

Extension Methods

ICommandConfigurator AddAsyncDelegate<TSettings>(string, Func<CommandContext, Task<int>>)
Adds a command without settings that executes an async delegate.
IBranchConfigurator AddBranch<TSettings>(string, Action<IConfigurator<TSettings>>)
Adds a command branch.
ICommandConfigurator AddDelegate<TSettings>(string, Func<CommandContext, int>)
Adds a command without settings that executes a delegate.
IUnsafeConfigurator SafetyOff<TSettings>()
Gets an IUnsafeConfigurator that allows composition of commands without type safety.