19 private readonly
string stringType;
25 : base(string.Empty, string.Empty)
37 this.stringType = IoTSensorData.UnitNamespace + this.value?.Unit;
59 public override bool Equals(
object obj)
62 (this.value?.Equals(Typed.value) ?? Typed.value is
null);
68 return this.value.GetHashCode();
108 return Grade.NotAtAll;
135 return this.value.CompareTo(Typed.value);
137 return base.CompareTo(obj);
Helps with parsing of commong data types.
static bool TryParse(string s, out double Value)
Tries to decode a string encoded double.
Represents a custom literal.
Represents a string literal.
Abstract base class for semantic literal values.
override string ToString()
object Value
Parsed value.
static bool TryParse(string UnitString, out Unit Unit)
Tries to parse a string into a unit.
const string UnitNamespace
urn:nf:iot:sd:1.0:unit:
Semantic literal for physical quantities.
QuantityLiteral()
Semantic literal for physical quantities.
override Grade Supports(Type ValueType)
How well the type supports a given value type.
override ISemanticLiteral Encapsulate(object Value)
Encapsulates an object value as a semantic literal value.
override int GetHashCode()
override string StringType
Type name (or null if literal value is a string)
override Grade Supports(string DataType)
How well the type supports a given data type.
override ISemanticLiteral Parse(string Value, string DataType, string Language)
Tries to parse a string value of the type supported by the class..
QuantityLiteral(PhysicalQuantity Value)
Semantic literal for physical quantities.
override bool Equals(object obj)
override int CompareTo(object obj)
Compares the current instance with another object of the same type and returns an integer that indica...
override object AssociatedObjectValue
Associated object value.
Interface for semantic literals.
Interface for objects that can be represented as a physical quantity.