Compartilhar via


CommandLineConfiguration Construtor

Definição

Inicializa uma nova instância da classe CommandLineConfiguration.

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)

Parâmetros

command
Command

O comando raiz para o analisador.

enablePosixBundling
Boolean

true para habilitar o agrupamento POSIX; caso contrário, false.

enableDirectives
Boolean

true para habilitar a análise de diretivas; caso contrário, false.

enableLegacyDoubleDashBehavior
Boolean

Habilita o comportamento herdado do -- token, que é ignorar a análise de tokens subsequentes e colocá-los na UnparsedTokens lista.

resources
LocalizationResources

Forneça mensagens de validação personalizadas.

responseFileHandling
ResponseFileHandling

Um dos valores de enumeração que especifica como os arquivos de resposta (.rsp) são tratados.

middlewarePipeline
IReadOnlyList<InvocationMiddleware>

Forneça um pipeline de middleware personalizado.

helpBuilderFactory
Func<BindingContext,HelpBuilder>

Forneça um construtor de ajuda personalizado.

Aplica-se a