2using System.Runtime.ExceptionServices;
3using System.Threading.Tasks;
15 private bool? bothBool =
null;
16 private bool? bothDouble =
null;
44 if (this.bothBool.HasValue &&
this.bothBool.Value && !(BL is
null))
46 bool LValue = BL.
Value;
48 if (!(Result is
null))
57 this.bothBool =
false;
62 if (!(BL is
null) && !this.bothBool.HasValue)
75 this.bothBool =
false;
81 ExceptionDispatchInfo.Capture(ex).Throw();
93 if (this.bothDouble.HasValue)
95 if (this.bothDouble.Value)
100 this.bothDouble =
false;
107 this.bothDouble =
true;
111 this.bothDouble =
false;
133 if (this.bothBool.HasValue &&
this.bothBool.Value && !(BL is
null))
135 bool LValue = BL.
Value;
137 if (!(Result is
null))
146 this.bothBool =
false;
151 if (!(BL is
null) && !this.bothBool.HasValue)
160 this.bothBool =
true;
164 this.bothBool =
false;
170 ExceptionDispatchInfo.Capture(ex).Throw();
173 this.bothBool =
true;
182 if (this.bothDouble.HasValue)
184 if (this.bothDouble.Value)
189 this.bothDouble =
false;
196 this.bothDouble =
true;
200 this.bothDouble =
false;
Script runtime exception.
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 .
Base class for binary dual double/bool operators.
override Task< IElement > EvaluateScalarAsync(IElement Left, IElement Right, Variables Variables)
Evaluates the operator on scalar operands.
override IElement EvaluateScalar(IElement Left, IElement Right, Variables Variables)
Evaluates the operator on scalar operands.
override async Task< IElement > EvaluateAsync(Variables Variables)
Evaluates the node, using the variables provided in the Variables collection.
abstract IElement Evaluate(double Left, double Right)
Evaluates the double operator.
virtual Task< IElement > EvaluateOptimizedResultAsync(bool Left)
Gives the operator a chance to optimize its execution if it knows the value of the left operand....
BinaryDualBoolDoubleOperator(ScriptNode Left, ScriptNode Right, int Start, int Length, Expression Expression)
Base class for binary dual double/bool operators.
virtual Task< IElement > EvaluateAsync(bool Left, bool Right)
Evaluates the boolean operator.
override IElement Evaluate(Variables Variables)
Evaluates the node, using the variables provided in the Variables collection.
abstract IElement EvaluateOptimizedResult(bool Left)
Gives the operator a chance to optimize its execution if it knows the value of the left operand....
abstract IElement Evaluate(bool Left, bool Right)
Evaluates the boolean operator.
virtual Task< IElement > EvaluateAsync(double Left, double Right)
Evaluates the double operator.
ScriptNode right
Right operand.
ScriptNode left
Left operand.
bool isAsync
If subtree is asynchroneous.
Base class for binary scalar operators.
Base class for all nodes in a parsed script tree.
int Length
Length of expression covered by node.
int Start
Start position in script expression.
abstract IElement Evaluate(Variables Variables)
Evaluates the node, using the variables provided in the Variables collection. This method should be ...
virtual Task< IElement > EvaluateAsync(Variables Variables)
Evaluates the node, using the variables provided in the Variables collection. This method should be ...
Basic interface for all types of elements.
object AssociatedObjectValue
Associated object value.