Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
FlushCounters.cs
1using System.Threading.Tasks;
6
8{
13 {
21 : base(Start, Length, Expression)
22 {
23 }
24
28 public override string FunctionName => nameof(FlushCounters);
29
34 public override bool IsAsynchronous => true;
35
43 {
44 return this.EvaluateAsync(Variables).Result;
45 }
46
53 public override async Task<IElement> EvaluateAsync(Variables Variables)
54 {
55 int NrCounters = await RuntimeCounters.FlushAsync();
56 return new DoubleNumber(NrCounters);
57 }
58 }
59}
Static class managing persistent counters.
static async Task< int > FlushAsync()
Flushes all cached counters to the database.
Class managing a script expression.
Definition: Expression.cs:41
Base class for funcions of zero variables.
int Length
Length of expression covered by node.
Definition: ScriptNode.cs:101
int Start
Start position in script expression.
Definition: ScriptNode.cs:92
Flushes pending counters to the database.
FlushCounters(int Start, int Length, Expression Expression)
Flushes pending counters to the database.
override bool IsAsynchronous
If the node (or its decendants) include asynchronous evaluation. Asynchronous nodes should be evaluat...
override async Task< IElement > EvaluateAsync(Variables Variables)
Evaluates the node, using the variables provided in the Variables collection. This method should be ...
override string FunctionName
Name of the function
override IElement Evaluate(Variables Variables)
Evaluates the node, using the variables provided in the Variables collection. This method should be ...
Collection of variables.
Definition: Variables.cs:25
Basic interface for all types of elements.
Definition: IElement.cs:21