Mono.Options.OptionSet.Add Method
Registers option so that any options matching Option.GetNames will be treated specially by OptionSet.Parse(IEnumerable<string>).

Syntax

public OptionSet Add (Option option)

Parameters

option
The Mono.Options.Option to register.

Returns

The current Mono.Options.OptionSet instance. This is to permit method chaining.

Exceptions

TypeReason
ArgumentException option has an alias (as returned from Option.GetNames) that conflicts with a previously registered Mono.Options.Option.
ArgumentNullException option is null.

Remarks

Registers each option name returned by Option.GetNames, ensuring that any option with a matching name will be handled by the option instance.

Requirements

Namespace: Mono.Options
Assembly: Mono.Options (in Mono.Options.dll)
Assembly Versions: 0.2.0.0, 0.2.1.0, 0.2.2.0, 0.2.3.0