Spec Interface

The specification of the OptionSpecOption.

C#
public interface Spec
Derived

Properties

Name

Gets the name.

ShortName

Gets the short name, if any.

Description

Gets the description.

Methods

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

Visits the long option.

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

Visits the short option.

GetHelpHeading()

Gets the heading of the help message.

Properties Detail

Name

Gets the name.

C#
string Name { get; }

Property Value

ShortName

Gets the short name, if any.

C#
char? ShortName { get; }

Property Value

Description

Gets the description.

C#
string Description { get; }

Property Value

Methods Detail

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

Visits the long option.

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

Parameters

kit
ParseKit

The parse kit.

builder
Builder

The builder.

argument
string

The argument if any.

queue
Queue<string>

The queue of the command line options. If this option has an option argument, the first element of the queue is consumed as the option argument. Otherwise, the queue is not modified.

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

Visits the short option.

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

Parameters

kit
ParseKit

The parse kit.

builder
Builder

The builder.

shortNameQueue
Queue<char>

The queue of the short name options. If this option does not have an option argument, the queue is not modified. Otherwise, all the elements of the queue are consumed as the option argument (and then, the queue gets empty).

queue
Queue<string>

The queue of the command line options. If this option has an option argument and shortNameQueue is empty, the first element of the queue is consumed as the option argument. Otherwise, the queue is not modified.

GetHelpHeading()

Gets the heading of the help message.

C#
string GetHelpHeading()

Returns

The heading of the help message.