Class CommandArgument
Represents one or many positional command line arguments. Arguments are parsed in the order in which Arguments lists them.
Namespace: McMaster.Extensions.CommandLineUtils
Assembly: McMaster.Extensions.CommandLineUtils.dll
Syntax
public class CommandArgument
Constructors
| Improve this Doc View SourceCommandArgument()
Initializes a new instance of CommandArgument.
Declaration
public CommandArgument()
Properties
| Improve this Doc View SourceDescription
A description of the argument.
Declaration
public string Description { get; set; }
Property Value
Type | Description |
---|---|
System.String |
MultipleValues
Allow multiple values.
Declaration
public bool MultipleValues { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Name
The name of the argument.
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ShowInHelpText
Determines if the argument appears in the generated help-text.
Declaration
public bool ShowInHelpText { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Validators
A collection of validators that execute before invoking OnExecute(Func<Int32>). When validation fails, ValidationErrorHandler is invoked.
Declaration
public ICollection<IArgumentValidator> Validators { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.ICollection<IArgumentValidator> |
Value
The first value from Values, if any.
Declaration
public string Value { get; }
Property Value
Type | Description |
---|---|
System.String |
Values
All values specified, if any.
Declaration
public List<string> Values { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<System.String> |