AbstractSpec<T> Class
The abstraction of OptionSpec and subclasses.
public abstract class AbstractSpec<T> : Spec
where T : Option
Type Parameters
- Inheritance
-
Abstract
Spec<T>
- Implements
Constructors
Abstract |
Initializes a new instance of the AbstractSpec<T> class. |
Properties
Methods
Fire(T) |
Invokes the callback function. |
Visit |
Description copied from interface: Spec
|
Visit |
Description copied from interface: Spec
|
Get |
Description copied from interface: Spec
|
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.
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
public string Name { get; }
Property Value
Implements
ShortName
public char? ShortName { get; }
Property Value
Implements
Description
public string Description { get; }
Property Value
Implements
Methods Detail
Fire(T)
Invokes the callback function.
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.
public abstract void VisitLongOption(ParseKit kit, Builder builer, string argument, Queue<string> queue)
Parameters
- kit
-
Parse
Kit
- builer
- Builder
- argument
- string
Implements
VisitShortOption(ParseKit, Builder, Queue<char>, Queue<string>)
Description copied from interface: Spec
Visits the short option.
public abstract void VisitShortOption(ParseKit kit, Builder builder, Queue<char> shortNameQueue, Queue<string> queue)
Parameters
- kit
-
Parse
Kit
- builder
- Builder
Implements
GetHelpHeading()
Description copied from interface: Spec
Gets the heading of the help message.
public abstract string GetHelpHeading()