ParseKit Class
The factory of OptionParsingException objects.
public sealed class ParseKit
- Inheritance
-
Parse
Kit
Constructors
Parse |
Initializes a new instance of the ParseKit class. |
Parse |
Initializes a new instance of the ParseKit class. |
Methods
New |
Gets a new OptionParsingException representing that the option which requires an argument has no argument. |
New |
Gets a new OptionParsingException representing that the option which requires no argument has an extra argument. |
New |
Gets a new OptionParsingException representing that the option is not found in the schema. |
New |
Gets a new OptionParsingException representing that the option name is ambiguous since the abbreviations are not unique. |
To |
|
Equals(object) | (Inherited from object) |
GetHashCode() | (Inherited from object) |
GetType() | (Inherited from object) |
MemberwiseClone() | (Inherited from object) |
ToString() | (Inherited from object) |
Operators
implicit operator string(Parse |
Gets the string representing the specified instance. |
Constructors Detail
ParseKit(OptionSchema, string)
Initializes a new instance of the ParseKit class.
public ParseKit(OptionSchema schema, string option)
Parameters
- schema
-
Option
Schema
The option schema.
- option
- string
The long name of the option. It can be followed by =value
.
ParseKit(OptionSchema, char)
Initializes a new instance of the ParseKit class.
public ParseKit(OptionSchema schema, char option)
Parameters
- schema
-
Option
Schema
The option schema.
- option
- char
The short name of the option.
Methods Detail
NewMissingArgument()
Gets a new OptionParsingException representing that the option which requires an argument has no argument.
public Exception NewMissingArgument()
Returns
The new exception.
NewUnableToGetArgument()
Gets a new OptionParsingException representing that the option which requires no argument has an extra argument.
public Exception NewUnableToGetArgument()
Returns
The new exception.
NewUnknownOption()
Gets a new OptionParsingException representing that the option is not found in the schema.
public Exception NewUnknownOption()
Returns
The new exception.
NewAmbiguousOption(IEnumerable<string>)
Gets a new OptionParsingException representing that the option name is ambiguous since the abbreviations are not unique.
public Exception NewAmbiguousOption(IEnumerable<string> candidates)
Parameters
- candidates
- IEnumerable<string>
The names of the candidates.
Returns
The new exception.
ToString()
public override sealed string ToString()
Returns
Operators Detail
implicit operator string(ParseKit)
Gets the string representing the specified instance.
public static implicit operator string(ParseKit kit)
Parameters
- kit
-
Parse
Kit
The instance.