Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
FirstEvaluator.cs
4
6{
11 {
12 private IElement first = null;
13
19 : base(Node.Argument)
20 {
21 }
22
26 public override void RestartEvaluator()
27 {
28 this.first = null;
29 }
30
35 public override void AggregateElement(IElement Element)
36 {
37 if (this.first is null)
38 this.first = Element;
39 }
40
44 public override IElement GetAggregatedResult()
45 {
46 return this.first ?? ObjectValue.Null;
47 }
48 }
49}
Base class for all types of elements.
Definition: Element.cs:14
override void RestartEvaluator()
Restarts the evaluator.
FirstEvaluator(First Node)
First(v) iterative evaluator
override IElement GetAggregatedResult()
Gets the aggregated result.
override void AggregateElement(IElement Element)
Aggregates one new element.
An interative evaluator of a function or operation defined by a single ScriptNode.
ScriptNode Node
Node being iteratively evaluated.
static readonly ObjectValue Null
Null value.
Definition: ObjectValue.cs:88
Basic interface for all types of elements.
Definition: IElement.cs:21