2using System.Collections;
3using System.Collections.Generic;
4using System.Threading.Tasks;
20 private bool processLast =
false;
33 this.e = ItemEnumerator;
35 this.groupBy = GroupBy;
36 this.groupNames = GroupNames;
60 List<object> Objects =
null;
63 int i, c = this.groupBy.Length;
66 while (this.processLast || await this.e.MoveNextAsync())
68 this.processLast =
false;
70 if (this.objectVariables is
null)
73 this.objectVariables.Object = this.e.Current;
79 for (i = 0; i < c; i++)
81 E = this.groupBy[i].Evaluate(this.objectVariables);
87 for (i = 0; i < c; i++)
89 E = this.groupBy[i].Evaluate(this.objectVariables);
94 if (o1 is
null ^ o2 is
null)
97 if (!(o1 is
null) && !o1.Equals(o2))
103 this.processLast =
true;
109 Objects =
new List<object>();
111 Objects.Add(this.e.Current);
117 this.current =
new GroupObject(Objects.ToArray(), Last,
this.groupNames,
this.variables);
128 this.processLast =
false;
Base class for all nodes in a parsed script tree.
Enumerator that groups items into groups, and returns aggregated elements.
async Task< bool > MoveNextAsync()
Advances the enumerator to the next element of the collection.
void Reset()
IEnumerator.Reset
bool MoveNext()
IEnumerator.MoveNext
GroupEnumerator(IResultSetEnumerator ItemEnumerator, Variables Variables, ScriptNode[] GroupBy, ScriptNode[] GroupNames)
Enumerator that groups items into groups, and returns aggregated elements.
object Current
IEnumerator.Current
Represents a collection of objects grouped together useing a GROUP BY construct.
Basic interface for all types of elements.
object AssociatedObjectValue
Associated object value.
Interface for result-set enumerators.