Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
OrderedGroupByIdentityQueryOperatorEnumerator.cs
Go to the documentation of this file.
3
5
6internal sealed class OrderedGroupByIdentityQueryOperatorEnumerator<TSource, TGroupKey, TOrderKey> : OrderedGroupByQueryOperatorEnumerator<TSource, TGroupKey, TSource, TOrderKey>
7{
12
13 protected override HashLookup<Wrapper<TGroupKey>, GroupKeyData> BuildHashLookup()
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 }
47}
bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
void Add(TKey key, TValue value)
OrderedGroupByIdentityQueryOperatorEnumerator(QueryOperatorEnumerator< Pair< TSource, TGroupKey >, TOrderKey > source, Func< TSource, TGroupKey > keySelector, IEqualityComparer< TGroupKey > keyComparer, IComparer< TOrderKey > orderComparer, CancellationToken cancellationToken)