2using System.Collections;
3using System.Threading.Tasks;
28 this.e = ItemEnumerator;
30 this.conditions = Conditions;
43 while (this.e.MoveNext())
45 if (this.MatchesCondition())
57 while (await this.e.MoveNextAsync())
59 if (await this.MatchesConditionAsync())
66 private bool MatchesCondition()
70 if (this.properties is
null)
73 this.properties.Object = this.e.Current;
75 IElement E = this.conditions.Evaluate(this.properties);
87 private async Task<bool> MatchesConditionAsync()
91 if (this.properties is
null)
92 this.properties =
new ObjectProperties(this.e.Current,
this.variables);
94 this.properties.Object = this.e.Current;
96 IElement E = await this.conditions.EvaluateAsync(this.properties);
Base class for all nodes in a parsed script tree.
Enumerator that only returns elements matching a set of conditions.
async Task< bool > MoveNextAsync()
IAsyncEnumerator.MoveNextAsync
object Current
IEnumerator.Current
void Reset()
IEnumerator.Reset
bool MoveNext()
IEnumerator.MoveNext
ConditionalEnumerator(IResultSetEnumerator ItemEnumerator, Variables Variables, ScriptNode Conditions)
Enumerator that only returns elements matching a set of conditions.
Basic interface for all types of elements.
object AssociatedObjectValue
Associated object value.
Interface for result-set enumerators.