Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
IndexedSelectQueryOperator.cs
Go to the documentation of this file.
4
6
7internal sealed class IndexedSelectQueryOperator<TInput, TOutput> : UnaryQueryOperator<TInput, TOutput>
8{
10 {
12
14
20
21 internal override bool MoveNext([MaybeNullWhen(false)][AllowNull] ref TOutput currentElement, ref int currentKey)
22 {
23 TInput currentElement2 = default(TInput);
24 if (_source.MoveNext(ref currentElement2, ref currentKey))
25 {
27 return true;
28 }
29 return false;
30 }
31
32 protected override void Dispose(bool disposing)
33 {
35 }
36 }
37
69
71
72 private bool _prematureMerge;
73
74 private bool _limitsParallelism;
75
76 internal override bool LimitsParallelism => _limitsParallelism;
77
85
98
104
106 {
107 int partitionCount = inputStream.PartitionCount;
109 if (_prematureMerge)
110 {
111 ListQueryResults<TInput> listQueryResults = QueryOperator<TInput>.ExecuteAndCollectResults(inputStream, partitionCount, base.Child.OutputOrdered, preferStriping, settings);
112 partitionedStream = listQueryResults.GetPartitionedStream();
113 }
114 else
115 {
117 }
119 for (int i = 0; i < partitionCount; i++)
120 {
122 }
124 }
125
127 {
128 return base.Child.AsSequentialQuery(token).Select(_selector);
129 }
130}
IndexedSelectQueryOperatorEnumerator(QueryOperatorEnumerator< TInput, int > source, Func< TInput, int, TOutput > selector)
override bool MoveNext([MaybeNullWhen(false)][AllowNull] ref TOutput currentElement, ref int currentKey)
static QueryResults< TOutput > NewResults(QueryResults< TInput > childQueryResults, IndexedSelectQueryOperator< TInput, TOutput > op, QuerySettings settings, bool preferStriping)
IndexedSelectQueryOperatorResults(QueryResults< TInput > childQueryResults, IndexedSelectQueryOperator< TInput, TOutput > op, QuerySettings settings, bool preferStriping)
override IEnumerable< TOutput > AsSequentialQuery(CancellationToken token)
override QueryResults< TOutput > Open(QuerySettings settings, bool preferStriping)
IndexedSelectQueryOperator(IEnumerable< TInput > child, Func< TInput, int, TOutput > selector)
override void WrapPartitionedStream< TKey >(PartitionedStream< TInput, TKey > inputStream, IPartitionedStreamRecipient< TOutput > recipient, bool preferStriping, QuerySettings settings)
bool MoveNext([MaybeNullWhen(false)][AllowNull] ref TElement currentElement, [AllowNull] ref TKey currentKey)
virtual T GetElement(int index)
UnaryQueryOperatorResults(QueryResults< TInput > childQueryResults, UnaryQueryOperator< TInput, TOutput > op, QuerySettings settings, bool preferStriping)
void SetOrdinalIndexState(OrdinalIndexState indexState)