Edit

Share via


CommandLineConfiguration Class

Definition

Represents the configuration used by the Parser.

public ref class CommandLineConfiguration
public class CommandLineConfiguration
type CommandLineConfiguration = class
Public Class CommandLineConfiguration
Inheritance
CommandLineConfiguration

Constructors

CommandLineConfiguration(Command, Boolean, Boolean, Boolean, Boolean, LocalizationResources, IReadOnlyList<InvocationMiddleware>, Func<BindingContext, HelpBuilder>, TryReplaceToken)

Initializes a new instance of the CommandLineConfiguration class.

CommandLineConfiguration(Command)

Properties

EnableDefaultExceptionHandler
EnableDirectives

Gets whether directives are enabled.

EnableLegacyDoubleDashBehavior

Enables the legacy behavior of the -- token, which is to ignore parsing of subsequent tokens and place them in the UnparsedTokens list.

EnablePosixBundling

Gets a value indicating whether POSIX bundling is enabled.

EnableTokenReplacement

Gets a value indicating whether token replacement is enabled.

Error
LocalizationResources

Gets the localizable resources.

Output
ProcessTerminationTimeout
ResponseFileTokenReplacer
RootCommand

Gets the root command.

Methods

Invoke(String)
Invoke(String[])
InvokeAsync(String, CancellationToken)
InvokeAsync(String[], CancellationToken)
Parse(IReadOnlyList<String>)
Parse(String)
ThrowIfInvalid()

Throws an exception if the parser configuration is ambiguous or otherwise not valid.

Extension Methods

ConfigureHelpFromXmlComments(CommandLineConfiguration, MethodInfo, String)
ConfigureRootCommandFromMethod(CommandLineConfiguration, MethodInfo, Object)
UseHost(CommandLineConfiguration, Action<IHostBuilder>)
UseHost(CommandLineConfiguration, Func<String[],IHostBuilder>, Action<IHostBuilder>)

Applies to