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

◆ BuildHashLookup()

Definition at line 16 of file OrderedGroupByElementSelectorQueryOperatorEnumerator.cs.

17 {
20 TOrderKey currentKey = default(TOrderKey);
21 int num = 0;
22 while (_source.MoveNext(ref currentElement, ref currentKey))
23 {
24 if ((num++ & 0x3F) == 0)
25 {
27 }
29 GroupKeyData value = null;
31 {
32 if (_orderComparer.Compare(currentKey, value._orderKey) < 0)
33 {
34 value._orderKey = currentKey;
35 }
36 }
37 else
38 {
39 value = new GroupKeyData(currentKey, key.Value, _orderComparer);
41 }
42 value._grouping.Add(_elementSelector(currentElement.First), currentKey);
43 }
44 for (int i = 0; i < hashLookup.Count; i++)
45 {
46 hashLookup[i].Value._grouping.DoneAdding();
47 }
48 return hashLookup;
49 }
bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
void Add(TKey key, TValue value)
readonly QueryOperatorEnumerator< Pair< TSource, TGroupKey >, TOrderKey > _source

References System.Linq.Parallel.OrderedGroupByQueryOperatorEnumerator< TSource, TGroupKey, TElement, TOrderKey >._cancellationToken, System.Linq.Parallel.OrderedGroupByElementSelectorQueryOperatorEnumerator< TSource, TGroupKey, TElement, TOrderKey >._elementSelector, System.Linq.Parallel.OrderedGroupByQueryOperatorEnumerator< TSource, TGroupKey, TElement, TOrderKey >._keyComparer, System.Linq.Parallel.OrderedGroupByQueryOperatorEnumerator< TSource, TGroupKey, TElement, TOrderKey >._orderComparer, System.Linq.Parallel.OrderedGroupByQueryOperatorEnumerator< TSource, TGroupKey, TElement, TOrderKey >._source, System.Collections.Generic.Dictionary< TKey, TValue >.Add(), System.Collections.Generic.IComparer< in T >.Compare(), System.Collections.Generic.Dictionary< TKey, TValue >.Count, System.key, System.Threading.CancellationToken.ThrowIfCancellationRequested(), System.Collections.Generic.Dictionary< TKey, TValue >.TryGetValue(), and System.value.