2using System.Reflection;
3using System.Threading.Tasks;
39 return this.EvaluateInherits(Left,
TypeValue);
41 return base.Evaluate(Left, Right,
Variables);
46 Type Expected = Right.
Value;
49 if (!(Obj is Type Candidate))
50 Candidate = Obj?.GetType() ?? typeof(
object);
52 if (Expected.GetTypeInfo().IsAssignableFrom(Candidate.GetTypeInfo()))
70 return base.EvaluateAsync(Left, Right,
Variables);
83 return this.EvaluateInherits(Left,
TypeValue);
Script runtime exception.
Class managing a script expression.
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.
static readonly BooleanValue False
Constant false value.
static readonly BooleanValue True
Constant true value.
override UpgradeBehaviour ScalarUpgradeBehaviour
How scalar operands of different types are to be treated. By default, scalar operands are required to...
override Task< IElement > EvaluateScalarAsync(IElement Left, IElement Right, Variables Variables)
Evaluates the operator on scalar operands.
override Task< IElement > EvaluateAsync(IElement Left, IElement Right, Variables Variables)
Evaluates the operator.
Inherits(ScriptNode Left, ScriptNode Right, int Start, int Length, Expression Expression)
Inherits operator.
override IElement EvaluateScalar(IElement Left, IElement Right, Variables Variables)
Evaluates the operator on scalar operands.
override IElement Evaluate(IElement Left, IElement Right, Variables Variables)
Evaluates the operator.
Basic interface for all types of elements.
object AssociatedObjectValue
Associated object value.
UpgradeBehaviour
How operands are to be handled if not of the same type.