2using System.Reflection;
15 private DateTime value;
32 set => this.value = value;
46 get {
return associatedSet; }
55 public override bool Equals(
object obj)
57 if (!(obj is
IElement E) || !(E.AssociatedObjectValue is DateTime TP))
60 return this.value == TP;
66 return this.value.GetHashCode();
77 if (DesiredType == typeof(DateTime))
82 else if (DesiredType == typeof(DateTimeOffset))
84 Value = (DateTimeOffset)this.value;
92 else if (DesiredType.GetTypeInfo().IsAssignableFrom(typeof(DateTime).GetTypeInfo()))
Base class for all types of elements.
Class managing a script expression.
static bool TryConvert(object Value, Type DesiredType, out object Result)
Tries to convert an object Value to an object of type DesiredType .
static string ToString(double Value)
Converts a value to a string, that can be parsed as part of an expression.
override int GetHashCode()
Calculates a hash code of the element. Hash code.
DateTime Value
DateTime value.
override string ToString()
override ISet AssociatedSet
Associated Set.
DateTimeValue(DateTime Value)
DateTime-valued number.
override bool TryConvertTo(Type DesiredType, out object Value)
Converts the value to a .NET type.
override bool Equals(object obj)
Compares the element to another. If elements are equal.
override object AssociatedObjectValue
Associated object value.
The set of Date & Time values.
Basic interface for all types of elements.
Basic interface for all types of sets.