3using System.Threading.Tasks;
119 Dictionary<string, long> Counters;
121 if (
string.IsNullOrEmpty(KeyPrefix))
125 if (
string.IsNullOrEmpty(Wildcard))
128 while (KeyPrefix.Contains(Wildcard))
131 KeyPrefix += Wildcard;
137 Dictionary<string, IElement> Result =
new Dictionary<string, IElement>();
139 if (
string.IsNullOrEmpty(Delimiter))
141 foreach (KeyValuePair<string, long> P
in Counters)
146 string[] Delimiters =
new string[] { Delimiter };
148 foreach (KeyValuePair<string, long> P
in Counters)
150 Dictionary<string, IElement> Next, Loop = Result;
152 string[] Parts = Key.Split(Delimiters, StringSplitOptions.None);
153 int i, c = Parts.Length;
155 for (i = 0; i < c; i++)
159 if (Loop.TryGetValue(Key, out
IElement E))
163 if (E.AssociatedObjectValue is Dictionary<string, IElement> Next2)
167 Next =
new Dictionary<string, IElement>()
186 Next =
new Dictionary<string, IElement>();
Static class managing persistent counters.
static Task< Dictionary< string, long > > GetWhereKeyLikeAsync(string Key, string Wildcard)
Gets available counters, matching a search filter.
static async Task< Dictionary< string, long > > GetWhereAsync()
Gets available counters.
Class managing a script expression.
Base class for multivariate funcions.
ScriptNode[] Arguments
Function arguments.
static readonly ArgumentType[] argumentTypes2Scalar
Two scalar parameters.
static readonly ArgumentType[] argumentTypes0
Zero parameters.
static readonly ArgumentType[] argumentTypes3Scalar
Three scalar parameters.
static readonly ArgumentType[] argumentTypes1Scalar
One scalar parameter.
Base class for all nodes in a parsed script tree.
int Length
Length of expression covered by node.
override string ToString()
Expression Expression
Expression of which the node is a part.
int Start
Start position in script expression.
static IElement EvaluateAddition(IElement Left, IElement Right, ScriptNode Node)
Adds two operands.
Gets a set of counters and returns an object with keys as properties and counter values the values....
GetCounters(int Start, int Length, Expression Expression)
Gets a set of counters and returns an object with keys as properties and counter values the values.
override string FunctionName
Name of the function
GetCounters(ScriptNode KeyPrefix, ScriptNode Delimiter, ScriptNode Wildcard, int Start, int Length, Expression Expression)
Gets a set of counters and returns an object with keys as properties and counter values the values....
override bool IsAsynchronous
If the node (or its decendants) include asynchronous evaluation. Asynchronous nodes should be evaluat...
GetCounters(ScriptNode KeyPrefix, int Start, int Length, Expression Expression)
Gets a set of counters and returns an object with keys as properties and counter values the values.
override string[] DefaultArgumentNames
Default Argument names
override IElement Evaluate(IElement[] Arguments, Variables Variables)
Evaluates the function.
GetCounters(ScriptNode KeyPrefix, ScriptNode Delimiter, int Start, int Length, Expression Expression)
Gets a set of counters and returns an object with keys as properties and counter values the values....
override async Task< IElement > EvaluateAsync(IElement[] Arguments, Variables Variables)
Evaluates the function.
Basic interface for all types of elements.