1using System.Collections.Generic;
2using System.Text.RegularExpressions;
3using System.Threading.Tasks;
35 this.options = Argument3;
36 this.PartialMatch =
true;
59 if (!(this.options is
null))
75 if (!(this.options is
null))
105 if (!(
Options.AssociatedObjectValue is
string s))
133 bool RecalcIsAsync =
false;
136 if (!(this.
left is
null))
138 b = !Callback(this.
left, out NewNode, State);
139 if (!(NewNode is
null))
144 RecalcIsAsync =
true;
147 if (b || Order ==
SearchMethod.TreeOrder && !
this.left.ForAllChildNodes(Callback, State, Order))
156 if (!(this.
right is
null))
158 b = !Callback(this.
right, out NewNode, State);
159 if (!(NewNode is
null))
161 this.right = NewNode;
164 RecalcIsAsync =
true;
167 if (b || Order ==
SearchMethod.TreeOrder && !
this.right.ForAllChildNodes(Callback, State, Order))
176 if (!(this.options is
null))
178 b = !Callback(this.options, out NewNode, State);
179 if (!(NewNode is
null))
181 this.options = NewNode;
184 RecalcIsAsync =
true;
187 if (b || Order ==
SearchMethod.TreeOrder && !
this.options.ForAllChildNodes(Callback, State, Order))
220 AreEqual(this.options, O.options) &&
227 int Result = base.GetHashCode();
Script runtime exception.
Class managing a script expression.
static RegexOptions GetOptions(string Options, ScriptNode Node)
Converts a string-representation of regex options into an enumeration value.
override bool IsAsynchronous
If the node (or its decendants) include asynchronous evaluation. Asynchronous nodes should be evaluat...
ScriptNode right
Right operand.
ScriptNode left
Left operand.
virtual Task< IElement > EvaluateScalarAsync(IElement Left, IElement Right, Variables Variables)
Evaluates the operator on scalar operands.
Base class for all nodes in a parsed script tree.
static bool AreEqual(ScriptNode S1, ScriptNode S2)
Compares if two script nodes are equal.
int Start
Start position in script expression.
void SetParent(ScriptNode Parent)
Sets the parent node. Can only be used when expression is being parsed.
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 ...
RegexOptions Options
Options for regular expression. Default is RegexOptions.Singleline.
override IElement EvaluateScalar(IElement Left, IElement Right, Variables Variables)
Evaluates the operator on scalar operands.
Extension of the Like operator, that allows the script to set options.
override async Task< IElement > EvaluateAsync(Variables Variables)
Evaluates the node, using the variables provided in the Variables collection.
override int GetHashCode()
Task< IElement > EvaluateAsync(Variables Variables, ISemanticCube Cube, SparqlQuery Query, Possibility Possibility)
Evaluates the node, using the variables provided in the Variables collection.
override bool ForAllChildNodes(ScriptNodeEventHandler Callback, object State, SearchMethod Order)
Calls the callback method for all child nodes.
LikeWithOptions(ScriptNode Argument1, ScriptNode Argument2, ScriptNode Argument3, int Start, int Length, Expression Expression)
Extension of the Like operator, that allows the script to set options.
override IElement Evaluate(Variables Variables)
Evaluates the node, using the variables provided in the Variables collection.
override bool Equals(object obj)
override void CalcIsAsync()
Recalculates if operator is asynchronous or not.
Represents a possible solution during SPARQL evaluation.
Interface for semantic cubes.
Basic interface for all types of elements.
Interface for filter nodes.
delegate bool ScriptNodeEventHandler(ScriptNode Node, out ScriptNode NewNode, object State)
Delegate for ScriptNode callback methods.
SearchMethod
Method to traverse the expression structure