Delen via


Argument Class

Definition

A symbol defining a value that can be passed on the command line to a command or option.

public ref class Argument abstract : System::CommandLine::Symbol
public abstract class Argument : System.CommandLine.Symbol
type Argument = class
    inherit Symbol
Public MustInherit Class Argument
Inherits Symbol
Inheritance
Argument
Derived

Constructors

Name Description
Argument(String)

Initializes a new instance of the Argument class.

Properties

Name Description
Arity

Gets or sets the arity of the argument.

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

The name used in help output to describe the argument.

Hidden

Gets or sets a value indicating whether the symbol is hidden.

(Inherited from Symbol)
Name

Gets the name of the symbol.

(Inherited from Symbol)
Parents

Gets the parent symbols.

(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
GetCompletions(CompletionContext)

Gets completions for the symbol.

GetDefaultValue()

Gets the default value for the argument.

ToString()

Returns a string that represents the current object.

Applies to