Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
NullableLongSumAggregationOperator.cs
Go to the documentation of this file.
3
5
6internal sealed class NullableLongSumAggregationOperator : InlinedAggregationOperator<long?, long?, long?>
7{
9 {
11
17
18 protected override bool MoveNextCore(ref long? currentElement)
19 {
20 long? currentElement2 = null;
21 TKey currentKey = default(TKey);
23 if (source.MoveNext(ref currentElement2, ref currentKey))
24 {
25 long num = 0L;
26 int num2 = 0;
27 do
28 {
29 if ((num2++ & 0x3F) == 0)
30 {
32 }
33 num = checked(num + currentElement2.GetValueOrDefault());
34 }
35 while (source.MoveNext(ref currentElement2, ref currentKey));
36 currentElement = num;
37 return true;
38 }
39 return false;
40 }
41
42 protected override void Dispose(bool disposing)
43 {
45 }
46 }
47
49 : base(child)
50 {
51 }
52
54 {
55 using IEnumerator<long?> enumerator = GetEnumerator(ParallelMergeOptions.FullyBuffered, suppressOrderPreservation: true);
56 long num = 0L;
57 while (enumerator.MoveNext())
58 {
59 num = checked(num + enumerator.Current.GetValueOrDefault());
60 }
61 return num;
62 }
63
68}
NullableLongSumAggregationOperatorEnumerator(QueryOperatorEnumerator< long?, TKey > source, int partitionIndex, CancellationToken cancellationToken)
override? long InternalAggregate(ref Exception singularExceptionToThrow)
override QueryOperatorEnumerator< long?, int > CreateEnumerator< TKey >(int index, int count, QueryOperatorEnumerator< long?, TKey > source, object sharedData, CancellationToken cancellationToken)