BadScript 2
Loading...
Searching...
No Matches
CommandLine.ValueAttribute Class Referencesealed

Models an value specification, or better how to handle values not bound to options. More...

Inheritance diagram for CommandLine.ValueAttribute:
CommandLine.BaseAttribute

Public Member Functions

 ValueAttribute (int index)
 Initializes a new instance of the CommandLine.ValueAttribute class.
 

Properties

int Index [get]
 Gets the position this option has on the command line.
 
string MetaName [get, set]
 Gets or sets name of this positional value specification.
 
- Properties inherited from CommandLine.BaseAttribute
bool Required [get, set]
 Gets or sets a value indicating whether a command line option is required.
 
int Min [get, set]
 When applied to System.Collections.Generic.IEnumerable<T> properties defines the lower range of items.
 
int Max [get, set]
 When applied to System.Collections.Generic.IEnumerable<T> properties defines the upper range of items.
 
object Default [get, set]
 Gets or sets mapped property default value.
 
string HelpText [get, set]
 Gets or sets a short description of this command line option. Usually a sentence summary.
 
string MetaValue [get, set]
 Gets or sets mapped property meta value. Usually an uppercase hint of required value type.
 
bool Hidden [get, set]
 Gets or sets a value indicating whether a command line option is visible in the help text.
 
Type ResourceType [get, set]
 Gets or sets the System.Type that contains the resources for HelpText.
 

Private Attributes

string metaName
 

Additional Inherited Members

- Package Functions inherited from CommandLine.BaseAttribute
 BaseAttribute ()
 Initializes a new instance of the CommandLine.BaseAttribute class.
 

Detailed Description

Models an value specification, or better how to handle values not bound to options.

Definition at line 11 of file ValueAttribute.cs.

Constructor & Destructor Documentation

◆ ValueAttribute()

CommandLine.ValueAttribute.ValueAttribute ( int  index)

Initializes a new instance of the CommandLine.ValueAttribute class.

Definition at line 18 of file ValueAttribute.cs.

19 {
20 Index = index;
21 metaName = string.Empty;
22 }
int Index
Gets the position this option has on the command line.

Member Data Documentation

◆ metaName

string CommandLine.ValueAttribute.metaName
private

Definition at line 13 of file ValueAttribute.cs.

Property Documentation

◆ Index

int CommandLine.ValueAttribute.Index
get

Gets the position this option has on the command line.

Definition at line 27 of file ValueAttribute.cs.

27{ get; }

◆ MetaName

string CommandLine.ValueAttribute.MetaName
getset

Gets or sets name of this positional value specification.

Definition at line 32 of file ValueAttribute.cs.

33 {
34 get => metaName;
35 set => metaName = value ?? throw new ArgumentNullException("value");
36 }

The documentation for this class was generated from the following file: