Add<TCommand, T>(TCommand, String, Action) Method

Definition

Assembly XenoAtom.CommandLine.dll

Adds to this command container an option which expect a specified type for its value.

public static TCommand Add<TCommand, T>(this TCommand command, string prototype, Action<T> action)
    where TCommand : CommandContainer where T : ISpanParsable<T>

Type parameters

TCommand
Type of the command container.
T
The value of the option.

Parameters

command
{TCommand}

The command to add the action to.

prototype
String

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

action
Action<T>

The associated action

Returns

{TCommand}
The command container.