12 private readonly
string language;
50 public string Type {
get;
set; }
69 return Grade.NotAtAll;
97 StringBuilder sb =
new StringBuilder();
103 if (!
string.IsNullOrEmpty(this.language))
106 sb.Append(this.language);
110 sb.Append(this.StringType);
113 return sb.ToString();
120 Typed.StringValue == this.StringValue &&
121 Typed.StringType == this.StringType &&
122 Typed.language == this.language;
129 Result ^= Result << 5 ^ this.StringType.GetHashCode();
130 Result ^= Result << 5 ^ (this.language?.GetHashCode() ?? 0);
149 int i = this.
StringValue.CompareTo(Typed.StringValue);
153 i = this.StringType.CompareTo(Typed.StringType);
157 return this.language?.CompareTo(Typed.language) ?? (Typed.language is
null ? 0 : -1);
160 return base.CompareTo(obj);
Helps with common JSON-related tasks.
static string Encode(string s)
Encodes a string for inclusion in JSON.
Represents a custom literal.
CustomLiteral()
Represents a custom literal.
CustomLiteral(string Value, string Type, string Language)
Represents a custom literal.
override string ToString()
string Type
Type name of value.
CustomLiteral(string Value, string Type)
Represents a custom literal.
string Language
Language of string.
override ISemanticLiteral Parse(string Value, string DataType, string Language)
Tries to parse a string value of the type supported by the class..
override ISemanticLiteral Encapsulate(object Value)
Encapsulates an object value as a semantic literal value.
override bool Equals(object obj)
override string StringType
Type name
override Grade Supports(Type ValueType)
How well the type supports a given value type.
override int CompareTo(object obj)
Compares the current instance with another object of the same type and returns an integer that indica...
override int GetHashCode()
Represents a string literal.
Abstract base class for semantic literal values.
string StringValue
String representation of value.
object Value
Parsed value.
Interface for semantic literals.