public static void CreateAggregates <AggregateType>(OnDemandProcessingContext odpContext, BucketedAggregatesCollection <AggregateType> aggDefs, ref BucketedDataAggregateObjs aggregates) where AggregateType : AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateInfo { if (aggDefs != null && !aggDefs.IsEmpty) { if (aggregates == null) { aggregates = new BucketedDataAggregateObjs(); } foreach (AggregateBucket <AggregateType> bucket in aggDefs.Buckets) { foreach (AggregateType aggregate in bucket.Aggregates) { AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateObj item = new AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateObj((AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateInfo)(object) aggregate, odpContext); ((BucketedAggregatesCollection <AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateObj>)aggregates).GetOrCreateBucket(bucket.Level).Aggregates.Add(item); } } } }
internal static void CreateAggregates <AggregateType>(OnDemandProcessingContext odpContext, BucketedAggregatesCollection <AggregateType> aggDefs, ref BucketedDataAggregateObjs aggregates) where AggregateType : Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateInfo { if (aggDefs == null || aggDefs.IsEmpty) { return; } if (aggregates == null) { aggregates = new BucketedDataAggregateObjs(); } foreach (AggregateBucket <AggregateType> bucket in aggDefs.Buckets) { foreach (AggregateType aggregate in bucket.Aggregates) { Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObj item = new Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObj(aggregate, odpContext); aggregates.GetOrCreateBucket(bucket.Level).Aggregates.Add(item); } } }