NDesk.Options

GIT Repository

NDesk.Options : NDesk.Options Namespace

OptionContext Class

Provides additional context information about the current NDesk.Options.Option which is being parsed.

public class OptionContext


Remarks

An instance of this class is provided via the registered callback when you subscribe to one of the following methods:

Members

See Also: Inherited members from object.

Constructors

Constructs and initializes a new instance of the NDesk.Options.OptionContext class.

Properties

Option
Option . The NDesk.Options.Option being parsed.
OptionIndex
int . The index within the options list that contains OptionContext.OptionValue.
OptionName
string . The actual option name used.
OptionValue
string . A string containing the option value.

Member Details

OptionContext Constructor

public OptionContext ()

Constructs and initializes a new instance of the NDesk.Options.OptionContext class.

Remarks

Required Assembly Versions:

  • NDesk.Options 2.0.0.0
  • NDesk.Options 3.5.0.0

Option Property

public Option Option { set; get; }

The NDesk.Options.Option being parsed.

Value

The NDesk.Options.Option being parsed.

Remarks

Required Assembly Versions:

  • NDesk.Options 2.0.0.0
  • NDesk.Options 3.5.0.0

OptionIndex Property

public int OptionIndex { set; get; }

The index within the options list that contains OptionContext.OptionValue.

See Also

Value

A int containing the index within the options list that contains OptionContext.OptionValue.

Remarks

To be added.

Required Assembly Versions:

  • NDesk.Options 2.0.0.0
  • NDesk.Options 3.5.0.0

OptionName Property

public string OptionName { set; get; }

The actual option name used.

Value

A string containing the actual option name used.

Remarks

A esk.Options.Option.Prototype can contain multiple |-delimited aliases, e.g. h|help. This property contains the actual option name specified, e.g. -h vs. --help.

Required Assembly Versions:

  • NDesk.Options 2.0.0.0
  • NDesk.Options 3.5.0.0

OptionValue Property

public string OptionValue { set; get; }

A string containing the option value.

Value

null if the OptionContext.Option takes no value or if the value is optional and was not specified; otherwise non-null.

Remarks

Required Assembly Versions:

  • NDesk.Options 2.0.0.0
  • NDesk.Options 3.5.0.0