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

◆ BuildHashLookup()

override HashLookup< Wrapper< TGroupKey >, GroupKeyData > System.Linq.Parallel.OrderedGroupByIdentityQueryOperatorEnumerator< TSource, TGroupKey, TOrderKey >.BuildHashLookup ( )
inlineprotected

Definition at line 13 of file OrderedGroupByIdentityQueryOperatorEnumerator.cs.

14 {
17 TOrderKey currentKey = default(TOrderKey);
18 int num = 0;
19 while (_source.MoveNext(ref currentElement, ref currentKey))
20 {
21 if ((num++ & 0x3F) == 0)
22 {
24 }
26 GroupKeyData value = null;
28 {
29 if (_orderComparer.Compare(currentKey, value._orderKey) < 0)
30 {
31 value._orderKey = currentKey;
32 }
33 }
34 else
35 {
36 value = new GroupKeyData(currentKey, key.Value, _orderComparer);
38 }
39 value._grouping.Add(currentElement.First, currentKey);
40 }
41 for (int i = 0; i < hashLookup.Count; i++)
42 {
43 hashLookup[i].Value._grouping.DoneAdding();
44 }
45 return hashLookup;
46 }
bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
void Add(TKey key, TValue value)

References System.Linq.Parallel.OrderedGroupByQueryOperatorEnumerator< TSource, TGroupKey, TSource, TOrderKey >._cancellationToken, System.Linq.Parallel.OrderedGroupByQueryOperatorEnumerator< TSource, TGroupKey, TSource, TOrderKey >._keyComparer, System.Linq.Parallel.OrderedGroupByQueryOperatorEnumerator< TSource, TGroupKey, TSource, TOrderKey >._orderComparer, System.Linq.Parallel.OrderedGroupByQueryOperatorEnumerator< TSource, TGroupKey, TSource, 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.