OptionSpec Class

The specification part of OptionImpl.

C#
public sealed class OptionSpec : AbstractSpec<Option>
Inheritance
OptionSpec
Implements

Constructors

OptionSpec(string, char?, string, Action<Option>)

Initializes a new instance of the OptionSpec class.

Properties

Name (Inherited from AbstractSpec<T>)
ShortName (Inherited from AbstractSpec<T>)
Description (Inherited from AbstractSpec<T>)

Methods

VisitLongOption(ParseKit, Builder, string, Queue<string>)

Description copied from class: AbstractSpec

Description copied from interface: Spec

Visits the long option.

VisitShortOption(ParseKit, Builder, Queue<char>, Queue<string>)

Description copied from class: AbstractSpec

Description copied from interface: Spec

Visits the short option.

GetHelpHeading()

Description copied from class: AbstractSpec

Description copied from interface: Spec

Gets the heading of the help message.

Fire(T)

Invokes the callback function.

(Inherited from AbstractSpec<T>)
VisitLongOption(ParseKit, Builder, string, Queue<string>)

Description copied from interface: Spec

Visits the long option.

(Inherited from AbstractSpec<T>)
VisitShortOption(ParseKit, Builder, Queue<char>, Queue<string>)

Description copied from interface: Spec

Visits the short option.

(Inherited from AbstractSpec<T>)
GetHelpHeading()

Description copied from interface: Spec

Gets the heading of the help message.

(Inherited from AbstractSpec<T>)
Equals(object) (Inherited from object)
GetHashCode() (Inherited from object)
GetType() (Inherited from object)
MemberwiseClone() (Inherited from object)
ToString() (Inherited from object)

Constructors Detail

OptionSpec(string, char?, string, Action<Option>)

Initializes a new instance of the OptionSpec class.

C#
public OptionSpec(string name, char? shortName, string description, Action<Option> action)

Parameters

name
string

The name.

shortName
char?

The short name.

description
string

The description.

action
Action<Option>

The action to be invoked.

See Also

Methods Detail

VisitLongOption(ParseKit, Builder, string, Queue<string>)

Description copied from class: AbstractSpec

Description copied from interface: Spec

Visits the long option.

C#
public override void VisitLongOption(ParseKit kit, Builder builder, string arguemnt, Queue<string> queue)

Parameters

kit
ParseKit
builder
Builder
arguemnt
string
queue
Queue<string>

VisitShortOption(ParseKit, Builder, Queue<char>, Queue<string>)

Description copied from class: AbstractSpec

Description copied from interface: Spec

Visits the short option.

C#
public override void VisitShortOption(ParseKit kit, Builder builder, Queue<char> shortNameQueue, Queue<string> queue)

Parameters

kit
ParseKit
builder
Builder
shortNameQueue
Queue<char>
queue
Queue<string>

GetHelpHeading()

Description copied from class: AbstractSpec

Description copied from interface: Spec

Gets the heading of the help message.

C#
public override string GetHelpHeading()

Returns

Description copied from class: AbstractSpec

Description copied from interface: Spec

The heading of the help message.