public override object PublishClone(AutomaticSubtotalContext context) { Cell cell = (Cell)base.PublishClone(context); cell.m_aggregates = new List <DataAggregateInfo>(); cell.m_postSortAggregates = new List <DataAggregateInfo>(); cell.m_runningValues = new List <RunningValueInfo>(); cell.m_dataScopeInfo = this.m_dataScopeInfo.PublishClone(context, cell.ID); context.AddAggregateHolder(cell); context.AddRunningValueHolder(cell); if (context.CurrentDataRegionClone != null) { cell.m_dataRegionDef = context.CurrentDataRegionClone; } return(cell); }
internal object PublishClone(AutomaticSubtotalContext context, ReportHierarchyNode owner) { Grouping grouping = (Grouping)MemberwiseClone(); grouping.m_isClone = true; grouping.m_ID = context.GenerateID(); grouping.m_owner = owner; if (DomainScope != null) { grouping.DomainScope = context.GetNewScopeName(DomainScope); if (string.CompareOrdinal(DomainScope, grouping.DomainScope) != 0) { context.DomainScopeGroups.Add(grouping); } else { grouping.m_scopeIDForDomainScope = Owner.DataScopeInfo.ScopeID; } } context.AddAggregateHolder(grouping); Global.Tracer.Assert(m_name != null); grouping.m_name = context.CreateAndRegisterUniqueGroupName(m_name, m_isClone); context.AddSortTarget(grouping.m_name, grouping); CloneGroupExpressions(context, grouping); if (m_groupLabel != null) { grouping.m_groupLabel = (ExpressionInfo)m_groupLabel.PublishClone(context); } if (m_sortDirections != null) { grouping.m_sortDirections = new List <bool>(m_sortDirections.Count); foreach (bool sortDirection in m_sortDirections) { grouping.m_sortDirections.Add(sortDirection); } } grouping.m_aggregates = new List <DataAggregateInfo>(); grouping.m_recursiveAggregates = new List <DataAggregateInfo>(); grouping.m_postSortAggregates = new List <DataAggregateInfo>(); if (m_filters != null) { grouping.m_filters = new List <Filter>(m_filters.Count); foreach (Filter filter in m_filters) { grouping.m_filters.Add((Filter)filter.PublishClone(context)); } } if (m_parent != null) { grouping.m_parent = new List <ExpressionInfo>(m_parent.Count); foreach (ExpressionInfo item in m_parent) { grouping.m_parent.Add((ExpressionInfo)item.PublishClone(context)); } } if (m_dataElementName != null) { grouping.m_dataElementName = (string)m_dataElementName.Clone(); } if (m_userSortExpressions != null) { grouping.m_userSortExpressions = new List <ExpressionInfo>(m_userSortExpressions.Count); foreach (ExpressionInfo userSortExpression in m_userSortExpressions) { grouping.m_userSortExpressions.Add((ExpressionInfo)userSortExpression.PublishClone(context)); } } if (m_variables != null) { grouping.m_variables = new List <Variable>(m_variables.Count); foreach (Variable variable in m_variables) { grouping.m_variables.Add((Variable)variable.PublishClone(context)); } } if (m_nonDetailSortFiltersInScope != null) { grouping.m_nonDetailSortFiltersInScope = new InScopeSortFilterHashtable(m_nonDetailSortFiltersInScope.Count); foreach (DictionaryEntry item2 in m_nonDetailSortFiltersInScope) { List <int> obj = (List <int>)item2.Value; List <int> list = new List <int>(obj.Count); foreach (int item3 in obj) { list.Add(item3); } grouping.m_nonDetailSortFiltersInScope.Add(item2.Key, list); } } if (m_detailSortFiltersInScope != null) { grouping.m_detailSortFiltersInScope = new InScopeSortFilterHashtable(m_detailSortFiltersInScope.Count); foreach (DictionaryEntry item4 in m_detailSortFiltersInScope) { List <int> obj2 = (List <int>)item4.Value; List <int> list2 = new List <int>(obj2.Count); foreach (int item5 in obj2) { list2.Add(item5); } grouping.m_detailSortFiltersInScope.Add(item4.Key, list2); } } if (m_pageBreak != null) { grouping.m_pageBreak = (PageBreak)m_pageBreak.PublishClone(context); } if (m_pageName != null) { grouping.m_pageName = (ExpressionInfo)m_pageName.PublishClone(context); } return(grouping); }
public object PublishClone(AutomaticSubtotalContext context, ReportHierarchyNode owner) { Grouping grouping = (Grouping)base.MemberwiseClone(); grouping.m_isClone = true; grouping.m_ID = context.GenerateID(); grouping.m_owner = owner; if (this.DomainScope != null) { grouping.DomainScope = context.GetNewScopeName(this.DomainScope); if (string.CompareOrdinal(this.DomainScope, grouping.DomainScope) != 0) { context.DomainScopeGroups.Add(grouping); } else { grouping.m_scopeIDForDomainScope = this.Owner.DataScopeInfo.ScopeID; } } context.AddAggregateHolder(grouping); Global.Tracer.Assert(this.m_name != null); grouping.m_name = context.CreateAndRegisterUniqueGroupName(this.m_name, this.m_isClone); context.AddSortTarget(grouping.m_name, grouping); this.CloneGroupExpressions(context, grouping); if (this.m_groupLabel != null) { grouping.m_groupLabel = (ExpressionInfo)this.m_groupLabel.PublishClone(context); } if (this.m_sortDirections != null) { grouping.m_sortDirections = new List <bool>(this.m_sortDirections.Count); foreach (bool sortDirection in this.m_sortDirections) { grouping.m_sortDirections.Add(sortDirection); } } grouping.m_aggregates = new List <DataAggregateInfo>(); grouping.m_recursiveAggregates = new List <DataAggregateInfo>(); grouping.m_postSortAggregates = new List <DataAggregateInfo>(); if (this.m_filters != null) { grouping.m_filters = new List <Filter>(this.m_filters.Count); foreach (Filter filter in this.m_filters) { grouping.m_filters.Add((Filter)filter.PublishClone(context)); } } if (this.m_parent != null) { grouping.m_parent = new List <ExpressionInfo>(this.m_parent.Count); foreach (ExpressionInfo item in this.m_parent) { grouping.m_parent.Add((ExpressionInfo)item.PublishClone(context)); } } if (this.m_dataElementName != null) { grouping.m_dataElementName = (string)this.m_dataElementName.Clone(); } if (this.m_userSortExpressions != null) { grouping.m_userSortExpressions = new List <ExpressionInfo>(this.m_userSortExpressions.Count); foreach (ExpressionInfo userSortExpression in this.m_userSortExpressions) { grouping.m_userSortExpressions.Add((ExpressionInfo)userSortExpression.PublishClone(context)); } } if (this.m_variables != null) { grouping.m_variables = new List <Variable>(this.m_variables.Count); foreach (Variable variable in this.m_variables) { grouping.m_variables.Add((Variable)variable.PublishClone(context)); } } if (this.m_nonDetailSortFiltersInScope != null) { grouping.m_nonDetailSortFiltersInScope = new InScopeSortFilterHashtable(this.m_nonDetailSortFiltersInScope.Count); IDictionaryEnumerator enumerator6 = this.m_nonDetailSortFiltersInScope.GetEnumerator(); try { while (enumerator6.MoveNext()) { object current6 = enumerator6.Current; DictionaryEntry dictionaryEntry = (DictionaryEntry)current6; List <int> list = (List <int>)dictionaryEntry.Value; List <int> list2 = new List <int>(list.Count); foreach (int item2 in list) { list2.Add(item2); } grouping.m_nonDetailSortFiltersInScope.Add(dictionaryEntry.Key, list2); } } finally { IDisposable disposable = enumerator6 as IDisposable; if (disposable != null) { disposable.Dispose(); } } } if (this.m_detailSortFiltersInScope != null) { grouping.m_detailSortFiltersInScope = new InScopeSortFilterHashtable(this.m_detailSortFiltersInScope.Count); IDictionaryEnumerator enumerator8 = this.m_detailSortFiltersInScope.GetEnumerator(); try { while (enumerator8.MoveNext()) { object current8 = enumerator8.Current; DictionaryEntry dictionaryEntry2 = (DictionaryEntry)current8; List <int> list3 = (List <int>)dictionaryEntry2.Value; List <int> list4 = new List <int>(list3.Count); foreach (int item3 in list3) { list4.Add(item3); } grouping.m_detailSortFiltersInScope.Add(dictionaryEntry2.Key, list4); } } finally { IDisposable disposable2 = enumerator8 as IDisposable; if (disposable2 != null) { disposable2.Dispose(); } } } if (this.m_pageBreak != null) { grouping.m_pageBreak = (PageBreak)this.m_pageBreak.PublishClone(context); } if (this.m_pageName != null) { grouping.m_pageName = (ExpressionInfo)this.m_pageName.PublishClone(context); } return(grouping); }