Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
InlinedAggregationOperator.cs
Go to the documentation of this file.
4
6
7internal abstract class InlinedAggregationOperator<TSource, TIntermediate, TResult> : UnaryQueryOperator<TSource, TIntermediate>
8{
9 internal override bool LimitsParallelism => false;
10
12 : base(child)
13 {
14 }
15
16 internal TResult Aggregate()
17 {
19 TResult result;
20 try
21 {
23 }
24 catch (Exception ex)
25 {
27 {
28 if (ex is OperationCanceledException ex2 && ex2.CancellationToken == base.SpecifiedQuerySettings.CancellationState.ExternalCancellationToken && base.SpecifiedQuerySettings.CancellationState.ExternalCancellationToken.IsCancellationRequested)
29 {
30 throw;
31 }
32 throw new AggregateException(ex);
33 }
34 throw;
35 }
36 if (singularExceptionToThrow != null)
37 {
39 }
40 return result;
41 }
42
44
46 {
49 }
50
61
63
64 [ExcludeFromCodeCoverage(Justification = "This method should never be called. Associative aggregation can always be parallelized")]
66 {
67 throw new NotSupportedException();
68 }
69}
TResult InternalAggregate(ref Exception singularExceptionToThrow)
override IEnumerable< TIntermediate > AsSequentialQuery(CancellationToken token)
override void WrapPartitionedStream< TKey >(PartitionedStream< TSource, TKey > inputStream, IPartitionedStreamRecipient< TIntermediate > recipient, bool preferStriping, QuerySettings settings)
QueryOperatorEnumerator< TIntermediate, int > CreateEnumerator< TKey >(int index, int count, QueryOperatorEnumerator< TSource, TKey > source, object sharedData, CancellationToken cancellationToken)
override QueryResults< TIntermediate > Open(QuerySettings settings, bool preferStriping)