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: 3.0.0
C#
public class ParseOptionsAttribute : Attribute
Inheritance
Object    Attribute    ParseOptionsAttribute

Remarks

Options can be provided in several ways; you can change the properties of the CommandLineParser class, you can use the ParseOptions class, or you can use the ParseOptionsAttribute attribute.

This attribute allows you to define your preferred parsing behavior declaratively, on the class that provides the arguments. Apply this attribute to the class to set the properties.

If you also use the ParseOptions class with one of the static ParseT(String, ParseOptions) functions, any options provided there will override the options set in this attribute.

If you wish to use the default options, you do not need to apply this attribute to your class at all.

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.
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.
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.
NameValueSeparator Gets or sets the character 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)

See Also