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

Definition

Assembly XenoAtom.CommandLine.dll

Adds to this command container an option which expects a specified type and will add the value to the specified list.

public static TCommand Add<TCommand, T>(this TCommand command, string prototype, ICollection<T> list)
    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".

list
ICollection<T>

The associated list to receive the value of this option

Returns

{TCommand}
The command container.