IConfigurator Interface

Represents a configurator.
public interface IConfigurator

Properties

abstract ICommandAppSettings Settings
Gets the command app settings.

Methods

abstract ICommandConfigurator AddAsyncDelegate<TSettings>(string, Func<CommandContext, TSettings, Task<int>>)
Adds a command that executes an async delegate.
abstract IBranchConfigurator AddBranch<TSettings>(string, Action<IConfigurator<TSettings>>)
Adds a command branch.
abstract ICommandConfigurator AddCommand<TCommand>(string)
Adds a command.
abstract ICommandConfigurator AddDelegate<TSettings>(string, Func<CommandContext, TSettings, int>)
Adds a command that executes a delegate.
abstract void AddExample(string[])
Adds an example of how to use the application.
abstract void SetHelpProvider(IHelpProvider)
Sets the help provider for the application.
abstract void SetHelpProvider<T>()
Sets the help provider for the application.

Extension Methods

ICommandConfigurator AddAsyncDelegate(string, Func<CommandContext, Task<int>>)
Adds a command without settings that executes an async delegate.
IBranchConfigurator AddBranch(string, Action<IConfigurator<CommandSettings>>)
Adds a command branch.
ICommandConfigurator AddDelegate(string, Func<CommandContext, int>)
Adds a command without settings that executes a delegate.
IConfigurator CaseSensitivity(CaseSensitivity)
Configures case sensitivity.
IConfigurator ConfigureConsole(IAnsiConsole)
Configures the console.
IConfigurator HideOptionDefaultValues()
Hides the DEFAULT column that lists default values coming from the DefaultValueAttribute in the options help text.
IConfigurator PropagateExceptions()
Tells the command line application to propagate all exceptions to the user.
IUnsafeConfigurator SafetyOff()
Gets an IUnsafeConfigurator that allows composition of commands without type safety.
IConfigurator SetApplicationCulture(CultureInfo)
Sets the culture for the application.
IConfigurator SetApplicationName(string)
Sets the name of the application.
IConfigurator SetApplicationVersion(string)
Sets the version of the application.
IConfigurator SetExceptionHandler(Action<Exception, ITypeResolver>)
Sets the ExceptionsHandler.

Setting ExceptionHandler this way will use the default exit code of -1.

IConfigurator SetExceptionHandler(Func<Exception, ITypeResolver, int>)
Sets the ExceptionsHandler.
IConfigurator SetHelpProvider(IHelpProvider)
Sets the help provider for the application.
IConfigurator SetHelpProvider<T>()
Sets the help provider for the application.
IConfigurator SetInterceptor(ICommandInterceptor)
Sets the command interceptor to be used.
IConfigurator TrimTrailingPeriods(bool)
Tells the help writer whether or not to trim trailing period.
IConfigurator UseAssemblyInformationalVersion()
Uses the version retrieved from the System.Reflection.AssemblyInformationalVersionAttribute as the application's version.
IConfigurator UseStrictParsing()
Sets the parsing mode to strict.
IConfigurator ValidateExamples()
Tells the command line application to validate all examples before running the application.