public AggregateUpdateCollection(AggregateBucket <DataAggregateObj> bucket)
 {
     this.m_level = bucket.Level;
     this.m_innermostUpdateScopeID    = -1;
     this.m_innermostUpdateScopeDepth = -1;
     foreach (DataAggregateObj aggregate in bucket.Aggregates)
     {
         DataAggregateInfo aggregateDef = aggregate.AggregateDef;
         if (aggregateDef.UpdatesAtRowScope)
         {
             this.Add <AggregatesByScopeId, DataAggregateObj>(ref this.m_rowAggsByUpdateScope, aggregateDef, aggregate);
         }
         else
         {
             this.Add <AggregatesByScopeId, DataAggregateObj>(ref this.m_aggsByUpdateScope, aggregateDef, aggregate);
         }
     }
 }
Exemplo n.º 2
0
 public AggregateDebugProxy(AggregateBucket bucket)
 {
     _bucket = bucket;
 }
        private AggregateUpdateQueue HandleNewBuckets(BucketedDataAggregateObjs aggBuckets, bool canMergeActiveAggs)
        {
            bool flag = aggBuckets == null || aggBuckets.Buckets.Count == 0;

            if (canMergeActiveAggs && flag)
            {
                return(null);
            }
            AggregateUpdateQueue      aggregateUpdateQueue      = new AggregateUpdateQueue(m_activeAggregates);
            AggregateUpdateCollection aggregateUpdateCollection = null;

            if (canMergeActiveAggs)
            {
                aggregateUpdateCollection = m_activeAggregates;
            }
            m_activeAggregates = null;
            if (flag)
            {
                return(aggregateUpdateQueue);
            }
            for (int i = 0; i < aggBuckets.Buckets.Count; i++)
            {
                AggregateBucket <Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObj> aggregateBucket = aggBuckets.Buckets[i];
                AggregateUpdateCollection aggregateUpdateCollection2 = new AggregateUpdateCollection(aggregateBucket);
                if (aggregateUpdateCollection != null)
                {
                    if (aggregateUpdateCollection.Level == aggregateBucket.Level)
                    {
                        aggregateUpdateCollection2.LinkedCollection = aggregateUpdateCollection;
                        aggregateUpdateCollection = null;
                    }
                    else if (aggregateUpdateCollection.Level < aggregateBucket.Level)
                    {
                        aggregateUpdateCollection2 = aggregateUpdateCollection;
                        i--;
                        aggregateUpdateCollection = null;
                    }
                }
                if (m_activeAggregates == null)
                {
                    m_activeAggregates = aggregateUpdateCollection2;
                }
                else
                {
                    aggregateUpdateQueue.Enqueue(aggregateUpdateCollection2);
                }
            }
            if (aggregateUpdateCollection != null)
            {
                aggregateUpdateQueue.Enqueue(aggregateUpdateCollection);
            }
            return(aggregateUpdateQueue);
        }