Compartir vía


CommandLineConfiguration Constructor

Definición

Inicializa una nueva instancia de la clase 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

Comando raíz del analizador.

enablePosixBundling
Boolean

true para habilitar la agrupación POSIX; de lo contrario, false.

enableDirectives
Boolean

true para habilitar el análisis de directivas; de lo contrario, false.

enableLegacyDoubleDashBehavior
Boolean

Habilita el comportamiento heredado del -- token, que es omitir el análisis de los tokens posteriores y colocarlos en la UnparsedTokens lista.

resources
LocalizationResources

Proporcione mensajes de validación personalizados.

responseFileHandling
ResponseFileHandling

Uno de los valores de enumeración que especifica cómo se controlan los archivos de respuesta (.rsp).

middlewarePipeline
IReadOnlyList<InvocationMiddleware>

Proporcione una canalización de middleware personalizada.

helpBuilderFactory
Func<BindingContext,HelpBuilder>

Proporcione un generador de ayuda personalizado.

Se aplica a