Add(TCommand, String, String?, Action<String, String?>, Boolean) Method

Definition

Assembly XenoAtom.CommandLine.dll

Adds to this command container an option which expect a pair of string value.

public static TCommand Add<TCommand>(this TCommand command, string prototype, string? description, Action<string, string?> action, bool hidden)
    where TCommand : CommandContainer

Type parameters

TCommand
Type of the command container.

Parameters

command
{TCommand}

The command to add the action to.

prototype
String

The prototype of the option. E.g "v|version".

description
String

The help description for this option.

action
Action<String, String?>

The associated action

hidden
Boolean

A boolean indicating if this option is hidden from the help.

Returns

{TCommand}
The command container.