CliCommandBuilderGetValueForArgumentT(ParseResult, CliArgument`1T) Method

Gets the parsed or default value for the specified argument.

Extended version for DotMake CLI which can bind custom classes, does not fall back to internal ArgumentConverter.GetDefaultValue which does not support all IList compatible types.

Definition

Namespace: DotMake.CommandLine
Assembly: DotMake.CommandLine (in DotMake.CommandLine.dll) Version: 1.8.8
C#
public static T GetValueForArgument<T>(
	ParseResult parseResult,
	CliArgument<T> argument
)

Parameters

parseResult  ParseResult
The parse result.
argument  CliArgumentT
The argument for which to get a value.

Type Parameters

T
The argument type.

Return Value

T
The parsed value or a configured default.

See Also