ParseOptions Class

Provides options that control parsing behavior.

Definition

Namespace: Ookii.CommandLine
Assembly: Ookii.CommandLine (in Ookii.CommandLine.dll) Version: 4.2.0+a4d3631e4dcc0970081ed435288efdebc1325f83
C#
public class ParseOptions
Inheritance
Object    ParseOptions
Derived

Remarks

Several options can also be specified using the ParseOptionsAttribute attribute on the type defining the arguments. If the option is set in both in the attribute and here, the value from the ParseOptions class will override the value from the ParseOptionsAttribute attribute.

Constructors

ParseOptionsInitializes a new instance of the ParseOptions class

Properties

AllowWhiteSpaceValueSeparator Gets or sets a value indicating whether the value of arguments may be separated from the name by white space.
AllowWhiteSpaceValueSeparatorOrDefault Gets a value indicating whether the value of arguments may be separated from the name by white space.
ArgumentNameComparison Gets or set the type of string comparison to use for argument names.
ArgumentNameComparisonOrDefault Gets the type of string comparison to use for argument names.
ArgumentNamePrefixes Gets or sets the argument name prefixes to use when parsing the arguments.
ArgumentNamePrefixesOrDefault Gets the argument name prefixes to use when parsing the arguments.
ArgumentNameTransform Gets or sets a value that indicates how names are created for arguments that don't have an explicit name.
ArgumentNameTransformOrDefault Gets a value that indicates how names are created for arguments that don't have an explicit name.
AutoHelpArgument Gets or sets a value that indicates a help argument will be automatically added.
AutoHelpArgumentOrDefault Gets a value that indicates a help argument will be automatically added.
AutoPrefixAliases Gets or sets a value that indicates whether unique prefixes of an argument are automatically used as aliases.
AutoPrefixAliasesOrDefault Gets a value that indicates whether unique prefixes of an argument are automatically used as aliases.
AutoVersionArgument Gets or sets a value that indicates a version argument will be automatically added.
AutoVersionArgumentOrDefault Gets a value that indicates a version argument will be automatically added.
Culture Gets or sets the culture used to convert command line argument values from their string representation to the argument type.
DefaultValueDescriptions Gets or sets a dictionary containing default value descriptions for types.
DuplicateArguments Gets or sets a value indicating whether duplicate arguments are allowed.
DuplicateArgumentsOrDefault Gets a value indicating whether duplicate arguments are allowed.
Error Gets or sets the TextWriter used to print error information if argument parsing fails.
ErrorColor Gets or sets the color applied to error messages.
ForceReflection Gets or sets a value that indicates whether the CommandLineParser class will use reflection even if the command line arguments type has the GeneratedParserAttribute.
IsPosix Gets or sets a value that indicates whether the options follow POSIX conventions.
LongArgumentNamePrefix Gets or sets the argument name prefix to use for long argument names.
LongArgumentNamePrefixOrDefault Gets the argument name prefix to use for long argument names.
Mode Gets or sets a value that indicates the command line argument parsing rules to use.
ModeOrDefault Gets a value that indicates the command line argument parsing rules to use.
NameValueSeparators Gets or sets the characters used to separate the name and the value of an argument.
NameValueSeparatorsOrDefault Gets the characters used to separate the name and the value of an argument.
PrefixTermination Gets or sets the behavior when an argument is encountered that consists of only the long argument prefix ("--" by default) by itself, not followed by a name.
PrefixTerminationOrDefault Gets the behavior when an argument is encountered that consists of only the long argument prefix ("--" by default) by itself, not followed by a name.
ShowUsageOnError Gets or sets a value that indicates how usage is shown after a parsing error occurred.
StringProvider Gets or sets the LocalizedStringProvider implementation to use to get strings for error messages and usage help.
UsageWriter Gets or sets the UsageWriter to use to create usage help.
UseErrorColor Gets or sets a value that indicates whether error messages should use color.
ValueDescriptionTransform Gets or sets a value that indicates how value descriptions derived from type names are transformed.
ValueDescriptionTransformOrDefault Gets a value that indicates how value descriptions derived from type names are transformed.
WarningColor Gets or sets the color applied to warning messages.

Methods

EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetTypeGets the Type of the current instance.
(Inherited from Object)
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Merge Merges the options in this instance with the options from the ParseOptionsAttribute attribute.
ToStringReturns a string that represents the current object.
(Inherited from Object)

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also