Search Results for

    Show / Hide Table of Contents

    Class CommandArgument<T>

    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.

    Inheritance
    System.Object
    CommandArgument
    CommandArgument<T>
    Inherited Members
    CommandArgument.Name
    CommandArgument.ShowInHelpText
    CommandArgument.Description
    CommandArgument.Values
    CommandArgument.MultipleValues
    CommandArgument.Value
    CommandArgument.Validators
    Namespace: McMaster.Extensions.CommandLineUtils
    Assembly: McMaster.Extensions.CommandLineUtils.dll
    Syntax
    public class CommandArgument<T> : CommandArgument, IInternalCommandParamOfT
    Type Parameters
    Name Description
    T

    Constructors

    | Improve this Doc View Source

    CommandArgument(IValueParser<T>)

    Initializes a new instance of CommandArgument<T>

    Declaration
    public CommandArgument(IValueParser<T> valueParser)
    Parameters
    Type Name Description
    IValueParser<T> valueParser

    The value parser.

    Properties

    | Improve this Doc View Source

    ParsedValue

    The parsed value.

    Declaration
    public T ParsedValue { get; }
    Property Value
    Type Description
    T
    | Improve this Doc View Source

    ParsedValues

    All parsed values;

    Declaration
    public IReadOnlyList<T> ParsedValues { get; }
    Property Value
    Type Description
    System.Collections.Generic.IReadOnlyList<T>

    Extension Methods

    ValidationExtensions.IsRequired(CommandArgument, Boolean, String)
    ValidationExtensions.IsRequired<T>(CommandArgument<T>, Boolean, String)
    ValidationExtensions.Accepts(CommandArgument, Action<IArgumentValidationBuilder>)
    ValidationExtensions.Accepts(CommandArgument)
    ValidationExtensions.Accepts<T>(CommandArgument<T>, Action<IArgumentValidationBuilder<T>>)
    ValidationExtensions.Accepts<T>(CommandArgument<T>)
    ValidationExtensions.OnValidate(CommandArgument, Func<ValidationContext, ValidationResult>)

    See Also

    CommandOption
    • Improve this Doc
    • View Source
    In This Article
    Back to top