![]() |
BadScript 2
|
Provides settings for CommandLine.Parser. Once consumed cannot be reused. More...
Public Member Functions | |
ParserSettings (int? maxDisplayWidth=null) | |
Initializes a new instance of the ParserSettings class. | |
void | Dispose () |
Frees resources owned by the instance. | |
Static Public Member Functions | |
static ParserSettings | CreateDefault (int? maxDisplayWidth=null) |
Static Public Attributes | |
const int | DefaultMaximumLength = 80 |
Properties | |
bool | CaseSensitive [get, set] |
Gets or sets a value indicating whether perform case sensitive comparisons. Note that case insensitivity only applies to parameters, not the values assigned to them (for example, enum parsing). | |
bool | CaseInsensitiveEnumValues [get, set] |
Gets or sets a value indicating whether perform case sensitive comparisons of values. Note that case insensitivity only applies to values, not the parameters. | |
CultureInfo | ParsingCulture [get, set] |
Gets or sets the culture used when parsing arguments to typed properties. | |
TextWriter | HelpWriter [get, set] |
Gets or sets the System.IO.TextWriter used for help method output. Setting this property to null, will disable help screen. | |
bool | IgnoreUnknownArguments [get, set] |
Gets or sets a value indicating whether the parser shall move on to the next argument and ignore the given argument if it encounter an unknown arguments. | |
bool | AutoHelp [get, set] |
Gets or sets a value indicating whether implicit option or verb 'help' should be supported. | |
bool | AutoVersion [get, set] |
Gets or sets a value indicating whether implicit option or verb 'version' should be supported. | |
bool | EnableDashDash [get, set] |
Gets or sets a value indicating whether enable double dash '–' syntax, that forces parsing of all subsequent tokens as values. If GetoptMode is true, this defaults to true, but can be turned off by explicitly specifying EnableDashDash = false. | |
int | MaximumDisplayWidth [get, set] |
Gets or sets the maximum width of the display. This determines word wrap when displaying the text. | |
bool | AllowMultiInstance [get, set] |
Gets or sets a value indicating whether options are allowed to be specified multiple times. If GetoptMode is true, this defaults to true, but can be turned off by explicitly specifying AllowMultiInstance = false. | |
bool | GetoptMode [get, set] |
Whether strict getopt-like processing is applied to option values; if true, AllowMultiInstance and EnableDashDash will default to true as well. | |
bool | PosixlyCorrect [get, set] |
Whether getopt-like processing should follow the POSIX rules (the equivalent of using the "+" prefix in the C getopt() call). If not explicitly set, will default to false unless the POSIXLY_CORRECT environment variable is set, in which case it will default to true. | |
StringComparer | NameComparer [get] |
bool | Consumed [get, set] |
Private Member Functions | |
int | GetWindowWidth () |
~ParserSettings () | |
Finalizes an instance of the CommandLine.ParserSettings class. | |
void | Dispose (bool disposing) |
Private Attributes | |
Maybe< bool > | allowMultiInstance |
bool | autoHelp |
bool | autoVersion |
bool | caseInsensitiveEnumValues |
bool | caseSensitive |
bool | disposed |
Maybe< bool > | enableDashDash |
bool | getoptMode |
TextWriter | helpWriter |
bool | ignoreUnknownArguments |
CultureInfo | parsingCulture |
Maybe< bool > | posixlyCorrect |
Provides settings for CommandLine.Parser. Once consumed cannot be reused.
Definition at line 16 of file ParserSettings.cs.
CommandLine.ParserSettings.ParserSettings | ( | int? | maxDisplayWidth = null | ) |
Initializes a new instance of the ParserSettings class.
Definition at line 36 of file ParserSettings.cs.
|
private |
Finalizes an instance of the CommandLine.ParserSettings class.
Definition at line 251 of file ParserSettings.cs.
|
static |
Definition at line 214 of file ParserSettings.cs.
void CommandLine.ParserSettings.Dispose | ( | ) |
Frees resources owned by the instance.
Definition at line 205 of file ParserSettings.cs.
|
private |
Definition at line 256 of file ParserSettings.cs.
|
private |
Definition at line 219 of file ParserSettings.cs.
|
private |
Definition at line 19 of file ParserSettings.cs.
|
private |
Definition at line 20 of file ParserSettings.cs.
|
private |
Definition at line 21 of file ParserSettings.cs.
|
private |
Definition at line 22 of file ParserSettings.cs.
|
private |
Definition at line 23 of file ParserSettings.cs.
|
static |
Definition at line 18 of file ParserSettings.cs.
|
private |
Definition at line 25 of file ParserSettings.cs.
|
private |
Definition at line 26 of file ParserSettings.cs.
|
private |
Definition at line 27 of file ParserSettings.cs.
|
private |
Definition at line 28 of file ParserSettings.cs.
|
private |
Definition at line 29 of file ParserSettings.cs.
|
private |
Definition at line 30 of file ParserSettings.cs.
|
private |
Definition at line 31 of file ParserSettings.cs.
|
getset |
Gets or sets a value indicating whether options are allowed to be specified multiple times. If GetoptMode is true, this defaults to true, but can be turned off by explicitly specifying AllowMultiInstance = false.
Definition at line 163 of file ParserSettings.cs.
|
getset |
Gets or sets a value indicating whether implicit option or verb 'help' should be supported.
Definition at line 126 of file ParserSettings.cs.
|
getset |
Gets or sets a value indicating whether implicit option or verb 'version' should be supported.
Definition at line 135 of file ParserSettings.cs.
|
getset |
Gets or sets a value indicating whether perform case sensitive comparisons of values. Note that case insensitivity only applies to values, not the parameters.
Definition at line 65 of file ParserSettings.cs.
|
getset |
Gets or sets a value indicating whether perform case sensitive comparisons. Note that case insensitivity only applies to parameters, not the values assigned to them (for example, enum parsing).
Definition at line 55 of file ParserSettings.cs.
|
getsetpackage |
Definition at line 198 of file ParserSettings.cs.
|
getset |
Gets or sets a value indicating whether enable double dash '–' syntax, that forces parsing of all subsequent tokens as values. If GetoptMode is true, this defaults to true, but can be turned off by explicitly specifying EnableDashDash = false.
Definition at line 147 of file ParserSettings.cs.
|
getset |
Whether strict getopt-like processing is applied to option values; if true, AllowMultiInstance and EnableDashDash will default to true as well.
Definition at line 173 of file ParserSettings.cs.
|
getset |
Gets or sets the System.IO.TextWriter used for help method output. Setting this property to null, will disable help screen.
It is the caller's responsibility to dispose or close the TextWriter.
Definition at line 98 of file ParserSettings.cs.
|
getset |
Gets or sets a value indicating whether the parser shall move on to the next argument and ignore the given argument if it encounter an unknown arguments.
true
to allow parsing the arguments with different class options that do not have all the arguments.
This allows fragmented version class parsing, useful for project with add-on where add-ons also requires command line arguments but when these are unknown by the main program at build time.
Definition at line 117 of file ParserSettings.cs.
|
getset |
Gets or sets the maximum width of the display. This determines word wrap when displaying the text.
Definition at line 156 of file ParserSettings.cs.
|
getpackage |
Definition at line 194 of file ParserSettings.cs.
|
getset |
Gets or sets the culture used when parsing arguments to typed properties.
Default is invariant culture, System.Globalization.CultureInfo.InvariantCulture.
Definition at line 77 of file ParserSettings.cs.
|
getset |
Whether getopt-like processing should follow the POSIX rules (the equivalent of using the "+" prefix in the C getopt() call). If not explicitly set, will default to false unless the POSIXLY_CORRECT environment variable is set, in which case it will default to true.
Definition at line 185 of file ParserSettings.cs.