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

◆ Aggregate()

TOutput System.Linq.Parallel.AssociativeAggregationOperator< TInput, TIntermediate, TOutput >.Aggregate ( )
inlinepackage

Definition at line 108 of file AssociativeAggregationOperator.cs.

109 {
110 TIntermediate val = default(TIntermediate);
111 bool flag = false;
113 {
114 while (enumerator.MoveNext())
115 {
116 if (flag)
117 {
118 try
119 {
120 val = _finalReduce(val, enumerator.Current);
121 }
122 catch (Exception ex)
123 {
124 throw new AggregateException(ex);
125 }
126 }
127 else
128 {
129 val = enumerator.Current;
130 flag = true;
131 }
132 }
133 if (!flag)
134 {
135 if (_throwIfEmpty)
136 {
138 }
139 val = ((_seedFactory == null) ? _seed : _seedFactory());
140 }
141 }
142 try
143 {
144 return _resultSelector(val);
145 }
146 catch (Exception ex2)
147 {
148 throw new AggregateException(ex2);
149 }
150 }
readonly Func< TIntermediate, TIntermediate, TIntermediate > _finalReduce
static string NoElements
Definition SR.cs:16
Definition SR.cs:7

References System.Linq.Parallel.AssociativeAggregationOperator< TInput, TIntermediate, TOutput >._finalReduce, System.Linq.Parallel.AssociativeAggregationOperator< TInput, TIntermediate, TOutput >._resultSelector, System.Linq.Parallel.AssociativeAggregationOperator< TInput, TIntermediate, TOutput >._seed, System.Linq.Parallel.AssociativeAggregationOperator< TInput, TIntermediate, TOutput >._seedFactory, System.Linq.Parallel.AssociativeAggregationOperator< TInput, TIntermediate, TOutput >._throwIfEmpty, and System.SR.NoElements.