public virtual object PublishClone(AutomaticSubtotalContext context)
        {
            DataAggregateInfo dataAggregateInfo = (DataAggregateInfo)MemberwiseClone();

            if (dataAggregateInfo.m_publishingInfo != null)
            {
                dataAggregateInfo.m_publishingInfo = m_publishingInfo.PublishClone();
                dataAggregateInfo.m_publishingInfo.NestedAggregates = null;
            }
            dataAggregateInfo.m_name = context.CreateAggregateID(m_name);
            bool flag = false;

            if (context.OuterAggregate != null)
            {
                flag = true;
                context.OuterAggregate.AddNestedAggregate(dataAggregateInfo);
            }
            if (IsAggregateOfAggregate)
            {
                context.OuterAggregate = dataAggregateInfo;
            }
            if (PublishingInfo.HasScope)
            {
                if (flag)
                {
                    dataAggregateInfo.SetScope(context.GetNewScopeNameForInnerOrOuterAggregate(this));
                }
                else
                {
                    dataAggregateInfo.SetScope(context.GetNewScopeName(PublishingInfo.Scope));
                }
            }
            if (m_expressions != null)
            {
                dataAggregateInfo.m_expressions = new ExpressionInfo[m_expressions.Length];
                for (int i = 0; i < m_expressions.Length; i++)
                {
                    dataAggregateInfo.m_expressions[i] = (ExpressionInfo)m_expressions[i].PublishClone(context);
                }
            }
            return(dataAggregateInfo);
        }
		internal DataAggregateInfo GetAsAggregate()
		{
			DataAggregateInfo dataAggregateInfo = null;
			if (base.AggregateType != AggregateTypes.Previous)
			{
				dataAggregateInfo = new DataAggregateInfo();
				dataAggregateInfo.AggregateType = base.AggregateType;
				dataAggregateInfo.Expressions = base.Expressions;
				dataAggregateInfo.SetScope(m_scope);
			}
			return dataAggregateInfo;
		}