ParseKit Class

The factory of OptionParsingException objects.

C#
public sealed class ParseKit
Inheritance
ParseKit

Constructors

ParseKit(OptionSchema, string)

Initializes a new instance of the ParseKit class.

ParseKit(OptionSchema, char)

Initializes a new instance of the ParseKit class.

Methods

NewMissingArgument()

Gets a new OptionParsingException representing that the option which requires an argument has no argument.

NewUnableToGetArgument()

Gets a new OptionParsingException representing that the option which requires no argument has an extra argument.

NewUnknownOption()

Gets a new OptionParsingException representing that the option is not found in the schema.

NewAmbiguousOption(IEnumerable<string>)

Gets a new OptionParsingException representing that the option name is ambiguous since the abbreviations are not unique.

ToString()
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(ParseKit)

Gets the string representing the specified instance.

Constructors Detail

ParseKit(OptionSchema, string)

Initializes a new instance of the ParseKit class.

C#
public ParseKit(OptionSchema schema, string option)

Parameters

schema
OptionSchema

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.

C#
public ParseKit(OptionSchema schema, char option)

Parameters

schema
OptionSchema

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.

C#
public Exception NewMissingArgument()

Returns

The new exception.

NewUnableToGetArgument()

Gets a new OptionParsingException representing that the option which requires no argument has an extra argument.

C#
public Exception NewUnableToGetArgument()

Returns

The new exception.

NewUnknownOption()

Gets a new OptionParsingException representing that the option is not found in the schema.

C#
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.

C#
public Exception NewAmbiguousOption(IEnumerable<string> candidates)

Parameters

candidates
IEnumerable<string>

The names of the candidates.

Returns

The new exception.

ToString()

C#
public override sealed string ToString()

Returns

Operators Detail

implicit operator string(ParseKit)

Gets the string representing the specified instance.

C#
public static implicit operator string(ParseKit kit)

Parameters

kit
ParseKit

The instance.

Returns