ParseOptionsAttribute Class

Provides options that alter parsing behavior for the class that the attribute is applied to.

Definition

Namespace: Ookii.CommandLine
Assembly: Ookii.CommandLine (in Ookii.CommandLine.dll) Version: 4.0.0+bb7ed9a8fdfd1cb21824750a8cf508863ad15086
C#
public class ParseOptionsAttribute : Attribute
Inheritance
Object    Attribute    ParseOptionsAttribute

Remarks

Options for parsing command line arguments can be supplied either using this attribute, or by using the ParseOptions class. Options set using the ParseOptions class will override the equivalent options set in the ParseOptionsAttribute attribute.

For subcommands, options set using the ParseOptionsAttribute attribute apply only to the command with the attribute. Apply the attribute to a common base class to set options for multiple commands, or use the CommandOptions class, which derives from the ParseOptions class, to set options for all commands.

If this is attribute is not present, the default options, or those set in the ParseOptions class, will be used.

Constructors

ParseOptionsAttributeInitializes a new instance of the ParseOptionsAttribute class

Properties

AllowWhiteSpaceValueSeparator Gets or sets a value indicating whether the value of arguments may be separated from the name by white space.
ArgumentNamePrefixes Gets or sets the prefixes that can be used to specify an argument name on the command line.
ArgumentNameTransform Gets or sets 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.
AutoPrefixAliases Gets or sets 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.
CaseSensitive Gets or sets a value that indicates whether argument names are treated as case sensitive.
DuplicateArguments Gets or sets a value indicating whether duplicate arguments are allowed.
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.
Mode Gets or sets 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.
TypeIdWhen implemented in a derived class, gets a unique identifier for this Attribute.
(Inherited from Attribute)
ValueDescriptionTransform Gets or sets a value that indicates how value descriptions derived from type names are transformed.

Methods

EqualsReturns a value that indicates whether this instance is equal to a specified object.
(Inherited from Attribute)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetHashCodeReturns the hash code for this instance.
(Inherited from Attribute)
GetTypeGets the Type of the current instance.
(Inherited from Object)
IsDefaultAttributeWhen overridden in a derived class, indicates whether the value of this instance is the default value for the derived class.
(Inherited from Attribute)
MatchWhen overridden in a derived class, returns a value that indicates whether this instance equals a specified object.
(Inherited from Attribute)
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
ToStringReturns a string that represents the current object.
(Inherited from Object)

Thread Safety

Static members of this type are safe for multi-threaded operations. Instance members of this type are safe for multi-threaded operations.

See Also