CommandLineBuilder Class
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.
Enables composition of command line configurations.
public ref class CommandLineBuilder
public class CommandLineBuilder
type CommandLineBuilder = class
Public Class CommandLineBuilder
- Inheritance
-
CommandLineBuilder
Constructors
CommandLineBuilder(Command) |
Properties
Command |
The command that the builder uses the root of the parser. |
EnableDirectives |
Determines whether the parser recognizes command line directives. |
EnableLegacyDoubleDashBehavior |
Determines the behavior when parsing a double dash ( |
EnablePosixBundling |
Determines whether the parser recognize and expands POSIX-style bundled options. |
ResponseFileHandling |
Configures the parser's handling of response files. When enabled, a command line token beginning with |
Methods
Build() |
Creates a parser based on the configuration of the command line builder. |
Equals(Object) |
Determines whether the specified object is equal to the current object. (Inherited from Object) |
GetHashCode() |
Serves as the default hash function. (Inherited from Object) |
GetType() |
Gets the Type of the current instance. (Inherited from Object) |
MemberwiseClone() |
Creates a shallow copy of the current Object. (Inherited from Object) |
ToString() |
Returns a string that represents the current object. (Inherited from Object) |
Extension Methods
AddMiddleware(CommandLineBuilder, Action<InvocationContext>, MiddlewareOrder) |
Adds a middleware delegate to the invocation pipeline called before a command handler is invoked. |
AddMiddleware(CommandLineBuilder, InvocationMiddleware, MiddlewareOrder) |
Adds a middleware delegate to the invocation pipeline called before a command handler is invoked. |
CancelOnProcessTermination(CommandLineBuilder) |
Enables signaling and handling of process termination via a CancellationToken that can be passed to a ICommandHandler during invocation. |
EnableDirectives(CommandLineBuilder, Boolean) |
Enables the parser to recognize command line directives. |
EnableLegacyDoubleDashBehavior(CommandLineBuilder, Boolean) |
Determines the behavior when parsing a double dash ( |
EnablePosixBundling(CommandLineBuilder, Boolean) |
Enables the parser to recognize and expand POSIX-style bundled options. |
ParseResponseFileAs(CommandLineBuilder, ResponseFileHandling) |
Configures the parser's handling of response files. When enabled, a command line token beginning with |
RegisterWithDotnetSuggest(CommandLineBuilder) |
Ensures that the application is registered with the |
UseDefaults(CommandLineBuilder) |
Uses the default configuration. |
UseEnvironmentVariableDirective(CommandLineBuilder) |
Enables the use of the |
UseExceptionHandler(CommandLineBuilder, Action<Exception,InvocationContext>, Nullable<Int32>) |
Enables an exception handler to catch any unhandled exceptions thrown by a command handler during invocation. |
UseHelp(CommandLineBuilder, Action<HelpContext>, Nullable<Int32>) |
Configures the application to show help when one of the specified option aliases are used on the command line. |
UseHelp(CommandLineBuilder, Nullable<Int32>) |
Configures the application to show help when one of the following options are specified on the command line:
|
UseHelp(CommandLineBuilder, String[]) |
Configures the application to show help when one of the specified option aliases are used on the command line. |
UseLocalizationResources(CommandLineBuilder, LocalizationResources) |
Specifies localization resources to be used when displaying help, error messages, and other user-facing strings. |
UseParseDirective(CommandLineBuilder, Nullable<Int32>) |
Enables the use of the |
UseParseErrorReporting(CommandLineBuilder, Nullable<Int32>) |
Configures the command line to write error information to standard error when there are errors parsing command line input. |
UseSuggestDirective(CommandLineBuilder) |
Enables the use of the |
UseTypoCorrections(CommandLineBuilder, Int32) |
Configures the application to provide alternative suggestions when a parse error is detected. |
UseVersionOption(CommandLineBuilder, String[]) |
Enables the use of a option (defaulting to the alias |
UseVersionOption(CommandLineBuilder) |
Enables the use of a option (defaulting to the alias |