AbstractSpec<T> Class

The abstraction of OptionSpec and subclasses.

C#
public abstract class AbstractSpec<T> : Spec
where T : Option

Type Parameters

T
Option

The type of Option interface.

Inheritance
AbstractSpec<T>
Implements

Constructors

AbstractSpec(string, char?, string, Action<T>)

Initializes a new instance of the AbstractSpec<T> class.

Properties

Methods

Fire(T)

Invokes the callback function.

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

Description copied from interface: Spec

Visits the long option.

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

Description copied from interface: Spec

Visits the short option.

GetHelpHeading()

Description copied from interface: Spec

Gets the heading of the help message.

Equals(object) (Inherited from object)
GetHashCode() (Inherited from object)
GetType() (Inherited from object)
MemberwiseClone() (Inherited from object)
ToString() (Inherited from object)

Constructors Detail

AbstractSpec(string, char?, string, Action<T>)

Initializes a new instance of the AbstractSpec<T> class.

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

Parameters

name
string

The name of the option.

shortName
char?

The short name of the option, if any.

description
string

The description of the option.

action
Action<T>

The action to be invoked.

Properties Detail

Name

C#
public string Name { get; }

Property Value

Implements

ShortName

C#
public char? ShortName { get; }

Property Value

Implements

Description

C#
public string Description { get; }

Property Value

Implements

Methods Detail

Fire(T)

Invokes the callback function.

C#
public void Fire(T option)

Parameters

option
T

The option to be consumed.

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

Description copied from interface: Spec

Visits the long option.

C#
public abstract void VisitLongOption(ParseKit kit, Builder builer, string argument, Queue<string> queue)

Parameters

kit
ParseKit
builer
Builder
argument
string
queue
Queue<string>

Implements

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

Description copied from interface: Spec

Visits the short option.

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

Parameters

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

Implements

GetHelpHeading()

Description copied from interface: Spec

Gets the heading of the help message.

C#
public abstract string GetHelpHeading()

Returns

Description copied from interface: Spec

The heading of the help message.

Implements