CommandLineConfiguration Constructor
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of the CommandLineConfiguration class.
public CommandLineConfiguration (System.CommandLine.Command command, bool enablePosixBundling = true, bool enableDirectives = true, bool enableLegacyDoubleDashBehavior = false, System.CommandLine.LocalizationResources? resources = default, System.CommandLine.Parsing.ResponseFileHandling responseFileHandling = System.CommandLine.Parsing.ResponseFileHandling.ParseArgsAsLineSeparated, System.Collections.Generic.IReadOnlyList<System.CommandLine.Invocation.InvocationMiddleware>? middlewarePipeline = default, Func<System.CommandLine.Binding.BindingContext,System.CommandLine.Help.HelpBuilder>? helpBuilderFactory = default);
new System.CommandLine.CommandLineConfiguration : System.CommandLine.Command * bool * bool * bool * System.CommandLine.LocalizationResources * System.CommandLine.Parsing.ResponseFileHandling * System.Collections.Generic.IReadOnlyList<System.CommandLine.Invocation.InvocationMiddleware> * Func<System.CommandLine.Binding.BindingContext, System.CommandLine.Help.HelpBuilder> -> System.CommandLine.CommandLineConfiguration
Public Sub New (command As Command, Optional enablePosixBundling As Boolean = true, Optional enableDirectives As Boolean = true, Optional enableLegacyDoubleDashBehavior As Boolean = false, Optional resources As LocalizationResources = Nothing, Optional responseFileHandling As ResponseFileHandling = System.CommandLine.Parsing.ResponseFileHandling.ParseArgsAsLineSeparated, Optional middlewarePipeline As IReadOnlyList(Of InvocationMiddleware) = Nothing, Optional helpBuilderFactory As Func(Of BindingContext, HelpBuilder) = Nothing)
Parameters
- command
- Command
The root command for the parser.
- enablePosixBundling
- Boolean
true
to enable POSIX bundling; otherwise, false
.
- enableDirectives
- Boolean
true
to enable directive parsing; otherwise, false
.
- enableLegacyDoubleDashBehavior
- Boolean
Enables the legacy behavior of the --
token, which is to ignore parsing of subsequent tokens and place them in the UnparsedTokens list.
- resources
- LocalizationResources
Provide custom validation messages.
- responseFileHandling
- ResponseFileHandling
One of the enumeration values that specifies how response files (.rsp) are handled.
- middlewarePipeline
- IReadOnlyList<InvocationMiddleware>
Provide a custom middleware pipeline.
- helpBuilderFactory
- Func<BindingContext,HelpBuilder>
Provide a custom help builder.