internal static bool HasAggregates <T>(BucketedAggregatesCollection <T> aggs) where T : IPersistable { if (aggs != null) { return(!aggs.IsEmpty); } return(false); }
public void MergeFrom(BucketedAggregatesCollection <T> otherCol) { if (otherCol == null) { return; } foreach (AggregateBucket <T> bucket in otherCol.Buckets) { GetOrCreateBucket(bucket.Level).Aggregates.AddRange(bucket.Aggregates); } }
internal void SetupAggregates <AggregateType>(OnDemandProcessingContext odpContext, BucketedAggregatesCollection <AggregateType> aggregateDefs, ref int aggregateValueOffset) where AggregateType : DataAggregateInfo { if (m_aggregateValues == null || aggregateDefs == null) { return; } foreach (AggregateType aggregateDef in aggregateDefs) { SetupAggregate(odpContext, aggregateDef, m_aggregateValues[aggregateValueOffset]); aggregateValueOffset++; } }
internal void StoreAggregates <AggregateType>(OnDemandProcessingContext odpContext, BucketedAggregatesCollection <AggregateType> aggregateDefs) where AggregateType : DataAggregateInfo { if (aggregateDefs == null || aggregateDefs.IsEmpty) { return; } if (m_aggregateValues == null) { m_aggregateValues = new List <DataAggregateObjResult>(); } foreach (AggregateType aggregateDef in aggregateDefs) { StoreAggregate(odpContext, aggregateDef, ref m_aggregateValues); } }