ConfiguratorExtensions Class

Contains extensions for IConfigurator and IConfigurator<TSettings>.
public static class ConfiguratorExtensions

Methods

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

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

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