namespace Spectre.Console.Cli; /// /// Represents a configurator. /// public interface IConfigurator { /// /// Sets the help provider for the application. /// /// The help provider to use. /// A configurator that can be used for further configuration. public IConfigurator SetHelpProvider(IHelpProvider helpProvider); /// /// Sets the help provider for the application. /// /// The type of the help provider to instantiate at runtime and use. /// A configurator that can be used for further configuration. public IConfigurator SetHelpProvider() where T : IHelpProvider; /// /// Gets the command app settings. /// public ICommandAppSettings Settings { get; } /// /// Adds an example of how to use the application. /// /// The example arguments. /// A configurator that can be used for further configuration. IConfigurator AddExample(params string[] args); /// /// 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, ICommand; /// /// Adds a command that executes a delegate. /// /// The 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 TSettings : CommandSettings; /// /// Adds a command that executes an async delegate. /// /// The 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 TSettings : CommandSettings; /// /// Adds a command branch. /// /// The command setting type. /// The name of the command branch. /// The command branch configurator. /// A branch configurator that can be used to configure the branch further. IBranchConfigurator AddBranch(string name, Action> action) where TSettings : CommandSettings; }