internal DataAggregateObj(DataAggregateInfo aggInfo, ReportProcessing.ProcessingContext processingContext) { m_nonAggregateMode = false; m_name = aggInfo.Name; m_duplicateNames = aggInfo.DuplicateNames; switch (aggInfo.AggregateType) { case DataAggregateInfo.AggregateTypes.First: m_aggregator = new First(); break; case DataAggregateInfo.AggregateTypes.Last: m_aggregator = new Last(); break; case DataAggregateInfo.AggregateTypes.Sum: m_aggregator = new Sum(); break; case DataAggregateInfo.AggregateTypes.Avg: m_aggregator = new Avg(); break; case DataAggregateInfo.AggregateTypes.Max: m_aggregator = new Max(processingContext.CompareInfo, processingContext.ClrCompareOptions); break; case DataAggregateInfo.AggregateTypes.Min: m_aggregator = new Min(processingContext.CompareInfo, processingContext.ClrCompareOptions); break; case DataAggregateInfo.AggregateTypes.CountDistinct: m_aggregator = new CountDistinct(); break; case DataAggregateInfo.AggregateTypes.CountRows: m_aggregator = new CountRows(); break; case DataAggregateInfo.AggregateTypes.Count: m_aggregator = new Count(); break; case DataAggregateInfo.AggregateTypes.StDev: m_aggregator = new StDev(); break; case DataAggregateInfo.AggregateTypes.Var: m_aggregator = new Var(); break; case DataAggregateInfo.AggregateTypes.StDevP: m_aggregator = new StDevP(); break; case DataAggregateInfo.AggregateTypes.VarP: m_aggregator = new VarP(); break; case DataAggregateInfo.AggregateTypes.Aggregate: m_aggregator = new Aggregate(); break; case DataAggregateInfo.AggregateTypes.Previous: m_aggregator = new Previous(); break; default: Global.Tracer.Assert(condition: false, "Unsupport aggregate type."); break; } m_aggregateDef = aggInfo; m_reportRT = processingContext.ReportRuntime; if (m_reportRT.ReportExprHost != null) { m_aggregateDef.SetExprHosts(m_reportRT.ReportExprHost, processingContext.ReportObjectModel); } m_aggregateResult = default(DataAggregateObjResult); Init(); }