Table of Contents

Class CommandArgument<T>

Namespace
McMaster.Extensions.CommandLineUtils
Assembly
McMaster.Extensions.CommandLineUtils.dll

Represents one or many positional command line arguments. Arguments are parsed in the order in which Arguments lists them. The raw value must be parsable into type T.

public class CommandArgument<T> : CommandArgument

Type Parameters

T
Inheritance
object
CommandArgument<T>
Inherited Members
Extension Methods

Constructors

CommandArgument(IValueParser<T>)

Initializes a new instance of CommandArgument<T>

public CommandArgument(IValueParser<T> valueParser)

Parameters

valueParser IValueParser<T>

The value parser.

Properties

DefaultValue

The default value of the argument.

public T? DefaultValue { get; set; }

Property Value

T

ParsedValue

The parsed value.

public T ParsedValue { get; }

Property Value

T

ParsedValues

All parsed values;

public IReadOnlyList<T> ParsedValues { get; }

Property Value

IReadOnlyList<T>

Methods

Reset()

Clear any parsed values from this argument.

public override void Reset()

See Also