namespace Spectre.Console.Cli;
///
/// Represents a configurator for specific settings.
///
/// The command setting type.
public interface IConfigurator
where TSettings : CommandSettings
{
///
/// Sets the description of the branch.
///
/// The description of the branch.
void SetDescription(string description);
///
/// Adds an example of how to use the branch.
///
/// The example arguments.
void AddExample(params string[] args);
///
/// Adds a default command.
///
///
/// This is the command that will run if the user doesn't specify one on the command line.
/// It must be able to execute successfully by itself ie. without requiring any command line
/// arguments, flags or option values.
///
/// The default command type.
void SetDefaultCommand()
where TDefaultCommand : class, ICommandLimiter;
///
/// Marks the branch as hidden.
/// Hidden branches do not show up in help documentation or
/// generated XML models.
///
void HideBranch();
///
/// Adds a command.
///
/// The command type.
/// The name of the command.
/// A command configurator that can be used to configure the command further.
ICommandConfigurator AddCommand(string name)
where TCommand : class, ICommandLimiter;
///
/// Adds a command that executes a delegate.
///
/// The derived command setting type.
/// The name of the command.
/// The delegate to execute as part of command execution.
/// A command configurator that can be used to configure the command further.
ICommandConfigurator AddDelegate(string name, Func func)
where TDerivedSettings : TSettings;
///
/// Adds a command that executes an async delegate.
///
/// The derived command setting type.
/// The name of the command.
/// The delegate to execute as part of command execution.
/// A command configurator that can be used to configure the command further.
ICommandConfigurator AddAsyncDelegate(string name, Func> func)
where TDerivedSettings : TSettings;
///
/// Adds a command branch.
///
/// The derived command setting type.
/// The name of the command branch.
/// The command branch configuration.
/// A branch configurator that can be used to configure the branch further.
IBranchConfigurator AddBranch(string name, Action> action)
where TDerivedSettings : TSettings;
}