2using System.Collections.Generic;
3using System.Threading.Tasks;
84 LinkedList<IElement> Elements =
new LinkedList<IElement>();
93 ICollection <IElement> OperandElements = Operand.
ChildElements;
96 if (OperandElements.Count == MemberElements.Count)
98 LinkedList<IElement> Elements =
new LinkedList<IElement>();
99 IEnumerator<IElement> eOperand = OperandElements.GetEnumerator();
100 IEnumerator<IElement> eMember = MemberElements.GetEnumerator();
104 while (eOperand.MoveNext() && eMember.MoveNext())
117 LinkedList<IElement> OperandResult =
new LinkedList<IElement>();
119 foreach (
IElement OperandChild
in OperandElements)
121 LinkedList<IElement> MemberResult =
new LinkedList<IElement>();
123 foreach (
IElement MemberChild
in MemberElements)
126 OperandResult.AddLast(Member.
Encapsulate(MemberResult, Node));
Script runtime exception.
Class managing a script expression.
ScriptNode right
Right operand.
ScriptNode left
Left operand.
Base class for all unary operators performing operand null checks.
readonly bool nullCheck
If null should be returned if operand is null.
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 ...
override async Task< IElement > EvaluateAsync(Variables Variables)
Evaluates the node, using the variables provided in the Variables collection.
DynamicMember(ScriptNode Left, ScriptNode Right, bool NullCheck, int Start, int Length, Expression Expression)
Dynamic member operator
override bool IsAsynchronous
If the node (or its decendants) include asynchronous evaluation. Asynchronous nodes should be evaluat...
override IElement Evaluate(Variables Variables)
Evaluates the node, using the variables provided in the Variables collection.
static async Task< IElement > EvaluateDynamicMember(IElement Operand, IElement Member, bool NullCheck, ScriptNode Node)
Evaluates a dynamic member.
static async Task< IElement > EvaluateDynamic(IElement Operand, string Name, bool NullCheck, ScriptNode Node)
Evaluates the member operator dynamically on an operand.
Basic interface for all types of elements.
object AssociatedObjectValue
Associated object value.
ICollection< IElement > ChildElements
An enumeration of child elements. If the element is a scalar, this property will return null.
IElement Encapsulate(ICollection< IElement > Elements, ScriptNode Node)
Encapsulates a set of elements into a similar structure as that provided by the current element.
bool IsScalar
If the element represents a scalar value.