23 public string Text {
get; }
27 return new Name(text);
32 return new Value(text);
35 public static Token Value(
string text,
bool explicitlyAssigned)
37 return new Value(text, explicitlyAssigned);
42 return new Value(text,
false,
true,
false);
47 return new Value(text,
false,
false,
true);
56#region IEquatable<Name> Members
70 public override bool Equals(
object obj)
79 return base.Equals(obj);
84 return new {
Tag,
Text }.GetHashCode();
91 : this(text, false, false, false) { }
93 public Value(
string text,
bool explicitlyAssigned)
94 : this(text, explicitlyAssigned, false, false) { }
96 public Value(
string text,
bool explicitlyAssigned,
bool forced,
bool fromSeparator)
119#region IEquatable<Value> Members
142 return base.Equals(obj);
147 return new {
Tag,
Text }.GetHashCode();
165 return token.IsValue() && ((
Value)token).FromSeparator;
170 return token.IsValue() && ((
Value)token).Forced;
override int GetHashCode()
override bool Equals(object obj)
static bool IsValueFromSeparator(this Token token)
static bool IsValueForced(this Token token)
static bool IsName(this Token token)
static bool IsValue(this Token token)
static Token Value(string text, bool explicitlyAssigned)
static Token Value(string text)
static Token Name(string text)
Token(TokenType tag, string text)
static Token ValueForced(string text)
static Token ValueFromSeparator(string text)
bool Forced
Whether this value came from args after the – separator (when EnableDashDash = true)
override bool Equals(object obj)
bool FromSeparator
Whether this value came from a sequence specified with a separator (e.g., "--files a....
Value(string text, bool explicitlyAssigned, bool forced, bool fromSeparator)
Value(string text, bool explicitlyAssigned)
bool ExplicitlyAssigned
Whether this value came from a long option with "=" separating the name from the value.
override int GetHashCode()