Argument Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
public ref class Argument abstract : System::CommandLine::Symbol
public ref class Argument : System::CommandLine::Symbol, System::CommandLine::IArgument
public abstract class Argument : System.CommandLine.Symbol
public class Argument : System.CommandLine.Symbol, System.CommandLine.IArgument
type Argument = class
inherit Symbol
type Argument = class
inherit Symbol
interface IArgument
interface ISymbol
interface ISuggestionSource
interface IValueDescriptor
Public MustInherit Class Argument
Inherits Symbol
Public Class Argument
Inherits Symbol
Implements IArgument
- Inheritance
- Derived
- Implements
Constructors
| Name | Description |
|---|---|
| Argument() | |
| Argument(String) |
Initializes a new instance of the Argument class. |
Properties
| Name | Description |
|---|---|
| Aliases | (Inherited from Symbol) |
| ArgumentType | |
| Arity |
Gets or sets the arity of the argument. |
| CaptureRemainingTokens |
Gets or sets a value indicating whether this argument captures all remaining tokens. |
| Children | (Inherited from Symbol) |
| CompletionSources |
Gets the list of completion sources for the argument. |
| Description |
Gets or sets the description of the symbol. (Inherited from Symbol) |
| HasDefaultValue |
Specifies if a default value is defined for the argument. |
| HelpName |
Gets or sets the placeholder name shown in usage help for the argument's value.
The value will be wrapped in angle brackets ( |
| Hidden |
Gets or sets a value indicating whether the symbol is hidden. (Inherited from Symbol) |
| IsHidden | (Inherited from Symbol) |
| Name |
Gets the name of the symbol. (Inherited from Symbol) |
| Parents |
Gets the parent symbols. (Inherited from Symbol) |
| RawAliases | (Inherited from Symbol) |
| Validators |
Provides a list of argument validators. Validators can be used to provide custom errors based on user input. |
| ValueType |
Gets or sets the Type that the argument's parsed tokens will be converted to. |
Methods
| Name | Description |
|---|---|
| AddAliasInner(String) | (Inherited from Symbol) |
| AddSuggestions(IReadOnlyCollection<String>) | |
| AddSuggestionSource(ISuggestionSource) | |
| AddSuggestionSource(Suggest) | |
| AddValidator(ValidateSymbol<ArgumentResult>) | |
| ClearAliases() | (Inherited from Symbol) |
| GetCompletions(CompletionContext) |
Gets completions for the symbol. |
| GetDefaultValue() |
Gets the default value for the argument. |
| HasAlias(String) | (Inherited from Symbol) |
| HasRawAlias(String) | (Inherited from Symbol) |
| SetDefaultValue(Func<Object>) | |
| SetDefaultValue(Object) | |
| Suggest(String) | |
| ToString() |
Returns a string that represents the current object. |
Explicit Interface Implementations
| Name | Description |
|---|---|
| IArgument.Arity | |
| ISymbol.Children | (Inherited from Symbol) |
| IValueDescriptor.Type | |
| IValueDescriptor.ValueName | |
Extension Methods
| Name | Description |
|---|---|
| BuildAlias(IValueDescriptor) | |