2using System.Reflection;
6using System.Threading.Tasks;
34 set => this.value = value;
40 if (this.value is
null)
51 get {
return associatedSet; }
60 public override bool Equals(
object obj)
65 object Obj = E.AssociatedObjectValue;
67 if ((this.value is
null) ^ (Obj is
null))
70 if (this.value is
null)
73 return this.value.Equals(Obj);
79 if (this.value is
null)
82 return this.value.GetHashCode();
98 TypeInfo TI = DesiredType.GetTypeInfo();
100 if (this.value is
null)
103 return !TI.IsValueType || !(Nullable.GetUnderlyingType(DesiredType) is
null);
107 if (TI.IsAssignableFrom(
this.value.GetType().GetTypeInfo()))
112 else if (TI.IsAssignableFrom(typeof(
ObjectValue).GetTypeInfo()))
125 [Obsolete(
"Use DisposeAsync() instead.")]
137 await DAsync.DisposeAsync();
138 else if (this.value is IDisposable D)
Base class for all types of elements.
Class managing a script expression.
static bool TryConvert(object Value, Type DesiredType, bool AcceptInformationLoss, out object Result)
Tries to convert an object Value to an object of type DesiredType .
static string ToExpressionString(object Value)
Converts an object to a string, that can be parsed as part of an expression.
void Dispose()
IDisposable.Dispose
ObjectValue(object Value)
Object value.
static readonly ObjectValue Null
Null value.
object Value
Object value.
override bool TryConvertTo(Type DesiredType, out object Value)
Converts the value to a .NET type.
override ISet AssociatedSet
Associated Set.
override bool Equals(object obj)
Compares the element to another. If elements are equal.
async Task DisposeAsync()
IDisposableAsync.DisposeAsync
override object AssociatedObjectValue
Associated object value.
override int GetHashCode()
Calculates a hash code of the element. Hash code.
override string ToString()
Interface for asynchronously disposable objects.
Basic interface for all types of elements.
Basic interface for all types of sets.