C# 클래스 System.CommandLine.CommandLineConfiguration

파일 보기 프로젝트 열기: dotnet/command-line-api 1 사용 예제들

Private Properties

프로퍼티 타입 설명
DefaultHelpBuilderFactory System.CommandLine.HelpBuilder
DefaultHelpBuilderFactory System.Collections.Generic
DefaultTokenReplacer bool
GetChild System.CommandLine.IdentifierSymbol
ThrowIfInvalid void

공개 메소드들

메소드 설명
CommandLineConfiguration ( System.CommandLine.Command command, bool enablePosixBundling = true, bool enableDirectives = true, bool enableTokenReplacement = true, LocalizationResources? resources = null, IReadOnlyList? middlewarePipeline = null, HelpBuilder>?.Func helpBuilderFactory = null, TryReplaceToken? tokenReplacer = null ) : System.Collections.Generic

Initializes a new instance of the CommandLineConfiguration class.

ThrowIfInvalid ( ) : void

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

Due to the performance cost of this method, it is recommended to be used in unit testing or in scenarios where the parser is configured dynamically at runtime.

비공개 메소드들

메소드 설명
DefaultHelpBuilderFactory ( BindingContext context, int? requestedMaxWidth = null ) : System.CommandLine.HelpBuilder
DefaultHelpBuilderFactory ( ) : System.Collections.Generic
DefaultTokenReplacer ( string tokenToReplace, IReadOnlyList? &replacementTokens, string? &errorMessage ) : bool
GetChild ( int index, System.CommandLine.Command command ) : System.CommandLine.IdentifierSymbol
ThrowIfInvalid ( System.CommandLine.Command command ) : void

메소드 상세

CommandLineConfiguration() 공개 메소드

Initializes a new instance of the CommandLineConfiguration class.
public CommandLineConfiguration ( System.CommandLine.Command command, bool enablePosixBundling = true, bool enableDirectives = true, bool enableTokenReplacement = true, LocalizationResources? resources = null, IReadOnlyList? middlewarePipeline = null, HelpBuilder>?.Func helpBuilderFactory = null, TryReplaceToken? tokenReplacer = null ) : System.Collections.Generic
command System.CommandLine.Command The root command for the parser.
enablePosixBundling bool to enable POSIX bundling; otherwise, .
enableDirectives bool to enable directive parsing; otherwise, .
enableTokenReplacement bool to enable token replacement; otherwise, .
resources LocalizationResources? Provide custom validation messages.
middlewarePipeline IReadOnlyList? Provide a custom middleware pipeline.
helpBuilderFactory HelpBuilder>?.Func Provide a custom help builder.
tokenReplacer TryReplaceToken? Replaces the specified token with any number of other tokens.
리턴 System.Collections.Generic

ThrowIfInvalid() 공개 메소드

Throws an exception if the parser configuration is ambiguous or otherwise not valid.
Due to the performance cost of this method, it is recommended to be used in unit testing or in scenarios where the parser is configured dynamically at runtime.
Thrown if the configuration is found to be invalid.
public ThrowIfInvalid ( ) : void
리턴 void