2using System.Collections.Generic;
3using System.Reflection;
4using System.Threading.Tasks;
42 return this.
Evaluate(Left, Index, Value);
59 return this.
Evaluate(Left, Index, Value);
69 V.SetElement((
int)d, Value);
79 if (Object is IDictionary<string, IElement> ObjExNihilo)
83 Type T = Object.GetType();
87 if (Index.
TryConvertTo(Parameters[0].ParameterType, out
object IndexValue))
96 throw new ScriptRuntimeException(
"Vector element assignment can only be performed on vectors or on objects with a suitable index property defined.",
this);
Script runtime exception.
Class managing a script expression.
ScriptNode RightOperand
Right operand.
ScriptNode LeftOperand
Left operand.
ScriptNode right
Right operand.
ScriptNode left
Left operand.
bool isAsync
If subtree is asynchroneous.
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 ...
Base class for all ternary operators.
ScriptNode middle
Middle operand.
Vector Index Assignment operator.
VectorIndexAssignment(VectorIndex VectorIndex, ScriptNode Operand, int Start, int Length, Expression Expression)
Vector Index Assignment operator.
override async Task< IElement > EvaluateAsync(Variables Variables)
Evaluates the node, using the variables provided in the Variables collection.
override IElement Evaluate(Variables Variables)
Evaluates the node, using the variables provided in the Variables collection.
static bool TryGetIndexProperty(Type T, bool ForReading, bool ForWriting, out PropertyInfo PropertyInfo, out ParameterInfo[] Parameters)
Tries to get a one-dimensional index property of a Type.
Basic interface for all types of elements.
bool TryConvertTo(Type DesiredType, out object Value)
Converts the value to a .NET type.
object AssociatedObjectValue
Associated object value.
bool IsScalar
If the element represents a scalar value.
Basic interface for vectors.