File tree Expand file tree Collapse file tree
src/explorer.api/Extensions Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,17 +27,11 @@ private ValueCounts()
2727 public static ValueCounts Compute < T > ( IEnumerable < T > rows )
2828 where T : ICountAggregate , ISuppressible
2929 {
30- return rows . Aggregate ( new ValueCounts ( ) , AccumulateCounts ) ;
30+ return rows . Aggregate ( new ValueCounts ( ) , AccumulateRow ) ;
3131 }
3232
33- private static ValueCounts AccumulateRow < T > ( ValueCounts vc , T row )
33+ public ValueCounts AccumulateRow < T > ( T row )
3434 where T : ICountAggregate , ISuppressible
35- {
36- vc . AccumulateRow < T > ( ValueCounts vc , T row ) ;
37- return vc ;
38- }
39-
40- public void AccumulateRow < T > ( T row )
4135 {
4236 TotalCount += row . Count ;
4337 TotalRows ++ ;
@@ -46,6 +40,15 @@ public void AccumulateRow<T>(T row)
4640 SuppressedCount += row . Count ;
4741 SuppressedRows ++ ;
4842 }
43+
44+ return this ;
45+ }
46+
47+ private static ValueCounts AccumulateRow < T > ( ValueCounts vc , T row )
48+ where T : ICountAggregate , ISuppressible
49+ {
50+ vc . AccumulateRow ( row ) ;
51+ return vc ;
4952 }
5053 }
5154}
You can’t perform that action at this time.
0 commit comments