BadScript 2
Loading...
Searching...
No Matches
CommandLine.Core.Value Class Reference
Inheritance diagram for CommandLine.Core.Value:
CommandLine.Core.Token

Public Member Functions

 Value (string text)
 
 Value (string text, bool explicitlyAssigned)
 
 Value (string text, bool explicitlyAssigned, bool forced, bool fromSeparator)
 
bool Equals (Value other)
 
override bool Equals (object obj)
 
override int GetHashCode ()
 

Properties

bool ExplicitlyAssigned [get]
 Whether this value came from a long option with "=" separating the name from the value.
 
bool FromSeparator [get]
 Whether this value came from a sequence specified with a separator (e.g., "--files a.txt,b.txt,c.txt")
 
bool Forced [get]
 Whether this value came from args after the – separator (when EnableDashDash = true)
 
- Properties inherited from CommandLine.Core.Token
TokenType Tag [get]
 
string Text [get]
 

Additional Inherited Members

- Static Public Member Functions inherited from CommandLine.Core.Token
static Token Name (string text)
 
static Token Value (string text)
 
static Token Value (string text, bool explicitlyAssigned)
 
static Token ValueForced (string text)
 
static Token ValueFromSeparator (string text)
 
- Protected Member Functions inherited from CommandLine.Core.Token
 Token (TokenType tag, string text)
 

Detailed Description

Definition at line 88 of file Token.cs.

Constructor & Destructor Documentation

◆ Value() [1/3]

CommandLine.Core.Value.Value ( string  text)

Definition at line 90 of file Token.cs.

91 : this(text, false, false, false) { }

◆ Value() [2/3]

CommandLine.Core.Value.Value ( string  text,
bool  explicitlyAssigned 
)

Definition at line 93 of file Token.cs.

94 : this(text, explicitlyAssigned, false, false) { }

◆ Value() [3/3]

CommandLine.Core.Value.Value ( string  text,
bool  explicitlyAssigned,
bool  forced,
bool  fromSeparator 
)

Definition at line 96 of file Token.cs.

97 : base(TokenType.Value, text)
98 {
99 ExplicitlyAssigned = explicitlyAssigned;
100 Forced = forced;
101 FromSeparator = fromSeparator;
102 }
bool Forced
Whether this value came from args after the – separator (when EnableDashDash = true)
Definition Token.cs:117
bool FromSeparator
Whether this value came from a sequence specified with a separator (e.g., "--files a....
Definition Token.cs:112
bool ExplicitlyAssigned
Whether this value came from a long option with "=" separating the name from the value.
Definition Token.cs:107

Member Function Documentation

◆ Equals() [1/2]

override bool CommandLine.Core.Value.Equals ( object  obj)

Definition at line 133 of file Token.cs.

134 {
135 Value other = obj as Value;
136
137 if (other != null)
138 {
139 return Equals(other);
140 }
141
142 return base.Equals(obj);
143 }
bool Equals(Value other)
Definition Token.cs:121
Value(string text)
Definition Token.cs:90

◆ Equals() [2/2]

bool CommandLine.Core.Value.Equals ( Value  other)

Definition at line 121 of file Token.cs.

122 {
123 if (other == null)
124 {
125 return false;
126 }
127
128 return Tag.Equals(other.Tag) && Text.Equals(other.Text) && Forced == other.Forced;
129 }

◆ GetHashCode()

override int CommandLine.Core.Value.GetHashCode ( )

Definition at line 145 of file Token.cs.

146 {
147 return new { Tag, Text }.GetHashCode();
148 }

Property Documentation

◆ ExplicitlyAssigned

bool CommandLine.Core.Value.ExplicitlyAssigned
get

Whether this value came from a long option with "=" separating the name from the value.

Definition at line 107 of file Token.cs.

107{ get; }

◆ Forced

bool CommandLine.Core.Value.Forced
get

Whether this value came from args after the – separator (when EnableDashDash = true)

Definition at line 117 of file Token.cs.

117{ get; }

◆ FromSeparator

bool CommandLine.Core.Value.FromSeparator
get

Whether this value came from a sequence specified with a separator (e.g., "--files a.txt,b.txt,c.txt")

Definition at line 112 of file Token.cs.

112{ get; }

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