12 private readonly
string language;
44 this.Type =
Type.AbsoluteUri;
70 this.Type =
Type.AbsoluteUri;
77 public string Type {
get;
set; }
96 return Grade.NotAtAll;
136 StringBuilder sb =
new StringBuilder();
142 if (!
string.IsNullOrEmpty(
Language))
152 return sb.ToString();
159 Typed.StringValue == this.StringValue &&
160 Typed.StringType == this.StringType &&
161 Typed.language == this.language;
168 Result ^= Result << 5 ^ this.StringType.GetHashCode();
169 Result ^= Result << 5 ^ (this.language?.GetHashCode() ?? 0);
188 int i = this.
StringValue.CompareTo(Typed.StringValue);
192 i = this.StringType.CompareTo(Typed.StringType);
196 return this.language?.CompareTo(Typed.language) ?? (Typed.language is
null ? 0 : -1);
199 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()
CustomLiteral(string Value, Uri Type, string Language)
Represents a custom literal.
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..
static string ToString(string StringValue, string Language, string StringType)
Outputs a string-representation of a custom literal.
override ISemanticLiteral Encapsulate(object Value)
Encapsulates an object value as a semantic literal value.
override bool Equals(object obj)
CustomLiteral(string Value, Uri Type)
Represents a custom literal.
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.