2using System.Collections.Generic;
4using System.Threading.Tasks;
58 return Task.CompletedTask;
94 else if (Obj is
bool b)
96 else if (Obj is
double d)
98 else if (Obj is DateTime TP)
99 return XML.
Encode(TP, TP.TimeOfDay == TimeSpan.Zero);
100 else if (Obj is BigInteger I)
Helps with parsing of commong data types.
static string Encode(bool x)
Encodes a Boolean for use in XML and other formats.
Helps with common XML-related tasks.
static string Encode(string s)
Encodes a string for use in XML.
Represents a case-insensitive string.
Base class for all types of elements.
abstract object AssociatedObjectValue
Associated object value.
Class managing a script expression.
static string ToString(double Value)
Converts a value to a string, that can be parsed as part of an expression.
Base class for all nodes in a parsed script tree.
int Length
Length of expression covered by node.
ScriptNode Parent
Parent 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 ...
static readonly ObjectValue Null
Null value.
Base class for all XML Script nodes in a parsed script tree.
static string EvaluateString(ScriptNode Node, Variables Variables)
Evaluates a script node to a string.
override IElement Evaluate(Variables Variables)
Evaluates the node, using the variables provided in the Variables collection.
static string EvaluateString(IElement Element)
Evaluates a script element to a string.
abstract bool IsApplicable(XmlNode CheckAgainst)
If the node is applicable in pattern matching against CheckAgainst .
abstract PatternMatchResult PatternMatch(XmlNode CheckAgainst, Dictionary< string, IElement > AlreadyFound)
Performs a pattern match operation.
virtual bool IsVector
If the node represents a vector of nodes.
static async Task< string > EvaluateStringAsync(ScriptNode Node, Variables Variables)
Evaluates a script node to a string.
XmlScriptNode(int Start, int Length, Expression Expression)
Base class for all XML Script nodes in a parsed script tree.
Basic interface for all types of elements.
PatternMatchResult
Status result of a pattern matching operation.