public 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)
     {
         foreach (AggregateBucket <T> bucket in otherCol.Buckets)
         {
             AggregateBucket <T> orCreateBucket = this.GetOrCreateBucket(bucket.Level);
             orCreateBucket.Aggregates.AddRange(bucket.Aggregates);
         }
     }
 }
Ejemplo n.º 3
0
 public void SetupAggregates <AggregateType>(OnDemandProcessingContext odpContext, BucketedAggregatesCollection <AggregateType> aggregateDefs, ref int aggregateValueOffset) where AggregateType : DataAggregateInfo
 {
     if (this.m_aggregateValues != null && aggregateDefs != null)
     {
         foreach (AggregateType aggregateDef in aggregateDefs)
         {
             ScopeInstance.SetupAggregate(odpContext, aggregateDef, this.m_aggregateValues[aggregateValueOffset]);
             aggregateValueOffset++;
         }
     }
 }
Ejemplo n.º 4
0
 public void StoreAggregates <AggregateType>(OnDemandProcessingContext odpContext, BucketedAggregatesCollection <AggregateType> aggregateDefs) where AggregateType : DataAggregateInfo
 {
     if (aggregateDefs != null && !aggregateDefs.IsEmpty)
     {
         if (this.m_aggregateValues == null)
         {
             this.m_aggregateValues = new List <DataAggregateObjResult>();
         }
         foreach (AggregateType aggregateDef in aggregateDefs)
         {
             ScopeInstance.StoreAggregate <AggregateType>(odpContext, aggregateDef, ref this.m_aggregateValues);
         }
     }
 }