IConfigurator Interface

Represents a configurator.
public interface IConfigurator

Properties

abstract ICommandAppSettings Settings
Gets the command app settings.

Methods

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.

Extension Methods

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 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 SetApplicationName(string)
Sets the name of the application.
IConfigurator SetApplicationVersion(string)
Overrides the auto-detected version of the application.
IConfigurator SetExceptionHandler(Action<Exception>)
Sets the ExceptionsHandler.

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

IConfigurator SetExceptionHandler(Func<Exception, int>)
Sets the ExceptionsHandler.
IConfigurator SetInterceptor(ICommandInterceptor)
Sets the command interceptor to be used.
IConfigurator UseStrictParsing()
Sets the parsing mode to strict.
IConfigurator ValidateExamples()
Tells the command line application to validate all examples before running the application.