Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
SelectQueryOperator.cs
Go to the documentation of this file.
4
6
7internal sealed class SelectQueryOperator<TInput, TOutput> : UnaryQueryOperator<TInput, TOutput>
8{
9 private sealed class SelectQueryOperatorEnumerator<TKey> : QueryOperatorEnumerator<TOutput, TKey>
10 {
12
14
20
21 internal override bool MoveNext([MaybeNullWhen(false)][AllowNull] ref TOutput currentElement, [AllowNull] ref TKey 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 internal override bool LimitsParallelism => false;
73
75 : base(child)
76 {
78 SetOrdinalIndexState(base.Child.OrdinalIndexState);
79 }
80
82 {
83 PartitionedStream<TOutput, TKey> partitionedStream = new PartitionedStream<TOutput, TKey>(inputStream.PartitionCount, inputStream.KeyComparer, OrdinalIndexState);
84 for (int i = 0; i < inputStream.PartitionCount; i++)
85 {
87 }
89 }
90
96
98 {
99 return base.Child.AsSequentialQuery(token).Select(_selector);
100 }
101}
bool MoveNext([MaybeNullWhen(false)][AllowNull] ref TElement currentElement, [AllowNull] ref TKey currentKey)
virtual T GetElement(int index)
SelectQueryOperatorEnumerator(QueryOperatorEnumerator< TInput, TKey > source, Func< TInput, TOutput > selector)
override bool MoveNext([MaybeNullWhen(false)][AllowNull] ref TOutput currentElement, [AllowNull] ref TKey currentKey)
static QueryResults< TOutput > NewResults(QueryResults< TInput > childQueryResults, SelectQueryOperator< TInput, TOutput > op, QuerySettings settings, bool preferStriping)
SelectQueryOperatorResults(QueryResults< TInput > childQueryResults, SelectQueryOperator< TInput, TOutput > op, QuerySettings settings, bool preferStriping)
override QueryResults< TOutput > Open(QuerySettings settings, bool preferStriping)
override IEnumerable< TOutput > AsSequentialQuery(CancellationToken token)
override void WrapPartitionedStream< TKey >(PartitionedStream< TInput, TKey > inputStream, IPartitionedStreamRecipient< TOutput > recipient, bool preferStriping, QuerySettings settings)
readonly Func< TInput, TOutput > _selector
SelectQueryOperator(IEnumerable< TInput > child, Func< TInput, TOutput > selector)
UnaryQueryOperatorResults(QueryResults< TInput > childQueryResults, UnaryQueryOperator< TInput, TOutput > op, QuerySettings settings, bool preferStriping)
void SetOrdinalIndexState(OrdinalIndexState indexState)