Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ MoveNext() [2/2]

override bool System.Linq.Parallel.HashJoinQueryOperatorEnumerator< TLeftInput, TLeftKey, TRightInput, TRightKey, THashKey, TOutput, TOutputKey >.MoveNext ( [AllowNull] ref TOutput currentElement,
[AllowNull] ref TOutputKey currentKey )
inlinepackage

Definition at line 44 of file HashJoinQueryOperatorEnumerator.cs.

45 {
46 Mutables mutables = _mutables;
47 if (mutables == null)
48 {
49 mutables = (_mutables = new Mutables());
50 mutables._rightHashLookup = _rightLookupBuilder.BuildHashLookup(_cancellationToken);
51 }
52 ListChunk<Pair<TRightInput, TRightKey>> currentRightMatches = mutables._currentRightMatches;
53 if (currentRightMatches != null && mutables._currentRightMatchesIndex == currentRightMatches.Count)
54 {
55 mutables._currentRightMatches = currentRightMatches.Next;
56 mutables._currentRightMatchesIndex = 0;
57 }
58 if (mutables._currentRightMatches == null)
59 {
60 Pair<TLeftInput, THashKey> currentElement2 = default(Pair<TLeftInput, THashKey>);
61 TLeftKey currentKey2 = default(TLeftKey);
62 while (_leftSource.MoveNext(ref currentElement2, ref currentKey2))
63 {
64 if ((mutables._outputLoopCount++ & 0x3F) == 0)
65 {
67 }
68 HashLookupValueList<TRightInput, TRightKey> value = default(HashLookupValueList<TRightInput, TRightKey>);
69 TLeftInput first = currentElement2.First;
70 THashKey second = currentElement2.Second;
71 if (second != null && mutables._rightHashLookup.TryGetValue(second, ref value))
72 {
73 mutables._currentRightMatches = value.Tail;
74 mutables._currentRightMatchesIndex = 0;
75 currentElement = _resultSelector(first, value.Head.First);
76 currentKey = _outputKeyBuilder.Combine(currentKey2, value.Head.Second);
77 if (value.Tail != null)
78 {
79 mutables._currentLeft = first;
80 mutables._currentLeftKey = currentKey2;
81 }
82 return true;
83 }
84 }
85 return false;
86 }
87 Pair<TRightInput, TRightKey> pair = mutables._currentRightMatches._chunk[mutables._currentRightMatchesIndex];
88 currentElement = _resultSelector(mutables._currentLeft, pair.First);
89 currentKey = _outputKeyBuilder.Combine(mutables._currentLeftKey, pair.Second);
90 mutables._currentRightMatchesIndex++;
91 return true;
92 }
readonly Func< TLeftInput, TRightInput, TOutput > _resultSelector
readonly QueryOperatorEnumerator< Pair< TLeftInput, THashKey >, TLeftKey > _leftSource
readonly HashJoinOutputKeyBuilder< TLeftKey, TRightKey, TOutputKey > _outputKeyBuilder
readonly HashLookupBuilder< TRightInput, TRightKey, THashKey > _rightLookupBuilder
HashJoinHashLookup< THashKey, TElement, TOrderKey > BuildHashLookup(CancellationToken cancellationToken)

References System.Linq.Parallel.HashJoinQueryOperatorEnumerator< TLeftInput, TLeftKey, TRightInput, TRightKey, THashKey, TOutput, TOutputKey >._cancellationToken, System.Linq.Parallel.HashJoinQueryOperatorEnumerator< TLeftInput, TLeftKey, TRightInput, TRightKey, THashKey, TOutput, TOutputKey >.Mutables._currentLeft, System.Linq.Parallel.HashJoinQueryOperatorEnumerator< TLeftInput, TLeftKey, TRightInput, TRightKey, THashKey, TOutput, TOutputKey >.Mutables._currentLeftKey, System.Linq.Parallel.HashJoinQueryOperatorEnumerator< TLeftInput, TLeftKey, TRightInput, TRightKey, THashKey, TOutput, TOutputKey >.Mutables._currentRightMatches, System.Linq.Parallel.HashJoinQueryOperatorEnumerator< TLeftInput, TLeftKey, TRightInput, TRightKey, THashKey, TOutput, TOutputKey >.Mutables._currentRightMatchesIndex, System.Linq.Parallel.HashJoinQueryOperatorEnumerator< TLeftInput, TLeftKey, TRightInput, TRightKey, THashKey, TOutput, TOutputKey >._leftSource, System.Linq.Parallel.HashJoinQueryOperatorEnumerator< TLeftInput, TLeftKey, TRightInput, TRightKey, THashKey, TOutput, TOutputKey >._mutables, System.Linq.Parallel.HashJoinQueryOperatorEnumerator< TLeftInput, TLeftKey, TRightInput, TRightKey, THashKey, TOutput, TOutputKey >._outputKeyBuilder, System.Linq.Parallel.HashJoinQueryOperatorEnumerator< TLeftInput, TLeftKey, TRightInput, TRightKey, THashKey, TOutput, TOutputKey >.Mutables._outputLoopCount, System.Linq.Parallel.HashJoinQueryOperatorEnumerator< TLeftInput, TLeftKey, TRightInput, TRightKey, THashKey, TOutput, TOutputKey >._resultSelector, System.Linq.Parallel.HashJoinQueryOperatorEnumerator< TLeftInput, TLeftKey, TRightInput, TRightKey, THashKey, TOutput, TOutputKey >.Mutables._rightHashLookup, System.Linq.Parallel.HashJoinQueryOperatorEnumerator< TLeftInput, TLeftKey, TRightInput, TRightKey, THashKey, TOutput, TOutputKey >._rightLookupBuilder, System.Linq.Parallel.HashLookupBuilder< TElement, TOrderKey, THashKey >.BuildHashLookup(), System.Linq.Parallel.ListChunk< TInputOutput >.Count, System.Linq.Parallel.Pair< T, U >.First, System.Linq.first, System.Linq.Parallel.ListChunk< TInputOutput >.Next, System.Linq.Parallel.Pair< T, U >.Second, System.Linq.second, System.Threading.CancellationToken.ThrowIfCancellationRequested(), System.Linq.Parallel.HashJoinHashLookup< THashKey, TElement, TOrderKey >.TryGetValue(), and System.value.