internal override void Traverse(ProcessingStages operation, bool ascending, ITraversalContext traversalContext) { RuntimeGroupRootObj runtimeGroupRootObj = m_owner as RuntimeGroupRootObj; Global.Tracer.Assert(runtimeGroupRootObj != null, "(null != groupRootOwner)"); runtimeGroupRootObj.TraverseLinkedGroupLeaves(operation, ascending, traversalContext); }
private void CopyDomainScopeGroupInstance(RuntimeGroupRootObj destination, ScalableDictionary <object, IReference <RuntimeHierarchyObj> > runtimeHierarchyObjRefs) { IReference <RuntimeHierarchyObj> reference = null; DomainScopeContext.DomainScopeInfo currentDomainScope = m_owner.OdpContext.DomainScopeContext.CurrentDomainScope; foreach (object key in runtimeHierarchyObjRefs.Keys) { currentDomainScope.AddKey(key); reference = runtimeHierarchyObjRefs[key]; using (reference.PinValue()) { RuntimeHierarchyObj runtimeHierarchyObj = reference.Value(); if (runtimeHierarchyObj.HierarchyObjs == null) { RuntimeGroupingObjHash runtimeGroupingObjHash = (RuntimeGroupingObjHash)runtimeHierarchyObj.Grouping; CopyDomainScopeGroupInstance(destination, runtimeGroupingObjHash.m_hashtable); } else { Global.Tracer.Assert(runtimeHierarchyObj.HierarchyObjs.Count == 1, "hierarchyObject.HierarchyObjs.Count == 1"); IReference <RuntimeHierarchyObj> reference2 = runtimeHierarchyObj.HierarchyObjs[0]; using (reference2.PinValue()) { RuntimeDataTablixGroupLeafObj runtimeDataTablixGroupLeafObj = (RuntimeDataTablixGroupLeafObj)reference2.Value(); currentDomainScope.CurrentRow = runtimeDataTablixGroupLeafObj.FirstRow; destination.NextRow(); } } } currentDomainScope.RemoveKey(); } }
internal override void CopyDomainScopeGroupInstances(RuntimeGroupRootObj destination) { DomainScopeContext domainScopeContext = m_owner.OdpContext.DomainScopeContext; domainScopeContext.CurrentDomainScope = new DomainScopeContext.DomainScopeInfo(); domainScopeContext.CurrentDomainScope.InitializeKeys((m_owner as RuntimeGroupRootObj).GroupExpressions.Count); CopyDomainScopeGroupInstance(destination, m_hashtable); domainScopeContext.CurrentDomainScope = null; }
internal ProcessingMessageList RegisterSpatialTypeComparisonError(string type) { Microsoft.ReportingServices.ReportProcessing.ObjectType objectType; string name; using (m_hierarchyRoot.PinValue()) { RuntimeGroupRootObj obj = (RuntimeGroupRootObj)m_hierarchyRoot.Value(); objectType = obj.HierarchyDef.DataRegionDef.ObjectType; name = obj.HierarchyDef.DataRegionDef.Name; } return(m_odpContext.RegisterSpatialTypeComparisonError(objectType, name, type)); }
private void ConstructorHelper(int exprIndex, RuntimeHierarchyObjReference hierarchyRoot) { m_hierarchyRoot = hierarchyRoot; using (m_hierarchyRoot.PinValue()) { RuntimeGroupRootObj runtimeGroupRootObj = m_hierarchyRoot.Value() as RuntimeGroupRootObj; Global.Tracer.Assert(runtimeGroupRootObj != null, "(null != groupRoot)"); List <Microsoft.ReportingServices.ReportIntermediateFormat.ExpressionInfo> list; IndexedExprHost expressionsHost; List <bool> directions; if (ProcessingStages.Grouping == runtimeGroupRootObj.ProcessingStage) { list = runtimeGroupRootObj.GroupExpressions; expressionsHost = runtimeGroupRootObj.GroupExpressionHost; directions = runtimeGroupRootObj.GroupDirections; } else { Global.Tracer.Assert(ProcessingStages.SortAndFilter == runtimeGroupRootObj.ProcessingStage, "(ProcessingStages.SortAndFilter == groupRoot.ProcessingStage)"); list = runtimeGroupRootObj.SortExpressions; expressionsHost = runtimeGroupRootObj.SortExpressionHost; directions = runtimeGroupRootObj.SortDirections; } if (exprIndex == -1 || exprIndex >= list.Count) { m_hierarchyObjs = new List <IReference <RuntimeHierarchyObj> >(); RuntimeGroupLeafObjReference runtimeGroupLeafObjReference = null; _ = m_odpContext.TablixProcessingScalabilityCache; if (ProcessingStages.Grouping == runtimeGroupRootObj.ProcessingStage) { runtimeGroupLeafObjReference = runtimeGroupRootObj.CreateGroupLeaf(); if (!runtimeGroupRootObj.HasParent) { runtimeGroupRootObj.AddChildWithNoParent(runtimeGroupLeafObjReference); } } if (null != runtimeGroupLeafObjReference) { m_hierarchyObjs.Add(runtimeGroupLeafObjReference); } } else { m_expression = new RuntimeExpressionInfo(list, expressionsHost, directions, exprIndex); m_grouping = RuntimeGroupingObj.CreateGroupingObj(runtimeGroupRootObj.GroupingType, this, m_objectType); } } }
private void CopyDomainScopeGroupInstancesFromTarget() { Microsoft.ReportingServices.ReportIntermediateFormat.Grouping grouping = HierarchyDef.Grouping; if (grouping != null && grouping.DomainScope != null) { IReference <RuntimeGroupRootObj> value; bool condition = base.OdpContext.DomainScopeContext.DomainScopes.TryGetValue(grouping.ScopeIDForDomainScope, out value); Global.Tracer.Assert(condition, "DomainScopes should contain the target group root for the specified group"); using (value.PinValue()) { RuntimeGroupRootObj runtimeGroupRootObj = value.Value(); ProcessingStage = ProcessingStages.Grouping; runtimeGroupRootObj.m_grouping.CopyDomainScopeGroupInstances(this); ProcessingStage = ProcessingStages.SortAndFilter; } } }
internal void InsertToSortTree(RuntimeGroupLeafObjReference groupLeaf) { using (m_hierarchyRoot.PinValue()) { RuntimeGroupRootObj runtimeGroupRootObj = (RuntimeGroupRootObj)m_hierarchyRoot.Value(); Microsoft.ReportingServices.ReportIntermediateFormat.Grouping grouping = runtimeGroupRootObj.HierarchyDef.Grouping; if (runtimeGroupRootObj.ProcessSecondPassSorting) { Global.Tracer.Assert(m_grouping != null, "(m_grouping != null)"); runtimeGroupRootObj.LastChild = groupLeaf; Global.Tracer.Assert(grouping != null, "(null != groupingDef)"); object keyValue = m_odpContext.ReportRuntime.EvaluateRuntimeExpression(m_expression, Microsoft.ReportingServices.ReportProcessing.ObjectType.Grouping, grouping.Name, "Sort"); m_grouping.NextRow(keyValue); } else { Global.Tracer.Assert(runtimeGroupRootObj.HierarchyDef.HasFilters || runtimeGroupRootObj.HierarchyDef.HasInnerFilters, "(groupRoot.HierarchyDef.HasFilters || groupRoot.HierarchyDef.HasInnerFilters)"); AddChild(groupLeaf); } } }
internal abstract void CopyDomainScopeGroupInstances(RuntimeGroupRootObj destination);
internal override void NextRow() { bool flag = true; RuntimeGroupRootObj runtimeGroupRootObj = null; using (m_hierarchyRoot.PinValue()) { if (m_hierarchyRoot is RuntimeGroupRootObjReference) { runtimeGroupRootObj = (RuntimeGroupRootObj)m_hierarchyRoot.Value(); if (ProcessingStages.SortAndFilter == runtimeGroupRootObj.ProcessingStage) { flag = false; } } if (m_hierarchyObjs != null) { if (flag) { IReference <RuntimeHierarchyObj> reference = m_hierarchyObjs[0]; Global.Tracer.Assert(reference != null, "(null != hierarchyObj)"); using (reference.PinValue()) { reference.Value().NextRow(); } } else if (runtimeGroupRootObj != null) { RuntimeGroupLeafObjReference lastChild = runtimeGroupRootObj.LastChild; Global.Tracer.Assert(null != lastChild, "(null != groupLastChild)"); m_hierarchyObjs.Add(lastChild); } } else { if (m_grouping == null) { return; } Microsoft.ReportingServices.ReportProcessing.ObjectType objectType = runtimeGroupRootObj.HierarchyDef.DataRegionDef.ObjectType; string name = runtimeGroupRootObj.HierarchyDef.DataRegionDef.Name; string propertyName = "GroupExpression"; DomainScopeContext domainScopeContext = base.OdpContext.DomainScopeContext; DomainScopeContext.DomainScopeInfo domainScopeInfo = null; if (domainScopeContext != null) { domainScopeInfo = domainScopeContext.CurrentDomainScope; } object obj; if (domainScopeInfo == null) { obj = ((m_expression != null) ? m_odpContext.ReportRuntime.EvaluateRuntimeExpression(m_expression, objectType, name, propertyName) : ((object)m_odpContext.ReportObjectModel.FieldsImpl.GetRowIndex())); } else { domainScopeInfo.MoveNext(); obj = domainScopeInfo.CurrentKey; } if (runtimeGroupRootObj != null && flag) { Microsoft.ReportingServices.ReportIntermediateFormat.Grouping grouping = runtimeGroupRootObj.HierarchyDef.Grouping; if (runtimeGroupRootObj.SaveGroupExprValues) { grouping.CurrentGroupExpressionValues.Add(obj); } MatchSortFilterScope(runtimeGroupRootObj.SelfReference, grouping, obj, m_expression.ExpressionIndex); } m_grouping.NextRow(obj); domainScopeInfo?.MovePrevious(); return; } } }
internal override void CopyDomainScopeGroupInstances(RuntimeGroupRootObj destination) { Global.Tracer.Assert(condition: false, "Domain Scope should only be applied to Hash groups"); }