private void CopyDomainScopeGroupInstance(RuntimeGroupRootObj destination, ScalableDictionary <object, IReference <RuntimeHierarchyObj> > runtimeHierarchyObjRefs) { IReference <RuntimeHierarchyObj> reference = null; DomainScopeContext.DomainScopeInfo currentDomainScope = base.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; this.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(); } }
public void CreateInstances(CreateInstancesTraversalContext traversalContext) { if (this.m_grouping != null) { this.m_grouping.Traverse(ProcessingStages.CreateGroupTree, this.m_expression == null || this.m_expression.Direction, traversalContext); } if (this.m_hierarchyObjs != null) { bool flag = true; for (int i = 0; i < this.m_hierarchyObjs.Count; i++) { IReference <RuntimeHierarchyObj> reference = this.m_hierarchyObjs[i]; using (reference.PinValue()) { RuntimeHierarchyObj runtimeHierarchyObj = reference.Value(); if (!flag || runtimeHierarchyObj is RuntimeGroupLeafObj) { ((RuntimeGroupLeafObj)runtimeHierarchyObj).TraverseAllLeafNodes(ProcessingStages.CreateGroupTree, traversalContext); flag = false; } else { ((RuntimeDetailObj)runtimeHierarchyObj).CreateInstance(traversalContext); } } } } }
public RuntimeGroupingObjHash(RuntimeHierarchyObj owner, AspNetCore.ReportingServices.ReportProcessing.ObjectType objectType) : base(owner, objectType) { OnDemandProcessingContext odpContext = owner.OdpContext; this.m_hashtable = new ScalableDictionary <object, IReference <RuntimeHierarchyObj> >(owner.Depth + 1, odpContext.TablixProcessingScalabilityCache, 101, 27, odpContext.ProcessingComparer); }
public RuntimeGroupingObjTree(RuntimeHierarchyObj owner, AspNetCore.ReportingServices.ReportProcessing.ObjectType objectType) : base(owner, objectType) { OnDemandProcessingContext odpContext = base.m_owner.OdpContext; this.m_tree = new BTree(owner, odpContext, owner.Depth + 1); }
public static RuntimeGroupingObj CreateGroupingObj(GroupingTypes type, RuntimeHierarchyObj owner, AspNetCore.ReportingServices.ReportProcessing.ObjectType objectType) { switch (type) { case GroupingTypes.None: return(new RuntimeGroupingObjLinkedList(owner, objectType)); case GroupingTypes.Hash: return(new RuntimeGroupingObjHash(owner, objectType)); case GroupingTypes.Sort: return(new RuntimeGroupingObjTree(owner, objectType)); case GroupingTypes.Detail: return(new RuntimeGroupingObjDetail(owner, objectType)); case GroupingTypes.DetailUserSort: return(new RuntimeGroupingObjDetailUserSort(owner, objectType)); case GroupingTypes.NaturalGroup: return(new RuntimeGroupingObjNaturalGroup(owner, objectType)); default: Global.Tracer.Assert(false, "Unexpected GroupingTypes"); throw new InvalidOperationException(); } }
public RuntimeHierarchyObj(RuntimeHierarchyObj outerHierarchy, AspNetCore.ReportingServices.ReportProcessing.ObjectType objectType, int level) : base(outerHierarchy.OdpContext, objectType, level) { if (outerHierarchy.m_expression != null) { this.ConstructorHelper(outerHierarchy.m_expression.ExpressionIndex + 1, outerHierarchy.m_hierarchyRoot); } else { this.ConstructorHelper(-1, outerHierarchy.m_hierarchyRoot); } }
public override void NextRow(object keyValue, bool hasParent, object parentKey) { if (this.m_lastChild != null && base.m_owner.OdpContext.EqualityComparer.Equals(this.m_lastValue, keyValue)) { using (this.m_lastChild.PinValue()) { RuntimeHierarchyObj runtimeHierarchyObj = this.m_lastChild.Value(); runtimeHierarchyObj.NextRow(); } } else { this.m_lastValue = keyValue; this.m_lastChild = base.CreateHierarchyObjAndAddToParent(); } }
protected RuntimeHierarchyObjReference CreateHierarchyObjAndAddToParent() { RuntimeHierarchyObjReference runtimeHierarchyObjReference = null; try { RuntimeHierarchyObj runtimeHierarchyObj = new RuntimeHierarchyObj(base.m_owner, base.m_objectType, ((IScope)base.m_owner).Depth + 1); runtimeHierarchyObjReference = (RuntimeHierarchyObjReference)runtimeHierarchyObj.SelfReference; runtimeHierarchyObj.NextRow(); return(runtimeHierarchyObjReference); } finally { if ((BaseReference)null != (object)runtimeHierarchyObjReference) { runtimeHierarchyObjReference.UnPinValue(); } } }
public virtual void CalculateRunningValues(AggregateUpdateContext aggContext) { if (this.m_grouping != null) { this.m_grouping.Traverse(ProcessingStages.RunningValues, this.m_expression == null || this.m_expression.Direction, aggContext); } if (this.m_hierarchyObjs != null) { bool flag = true; for (int i = 0; i < this.m_hierarchyObjs.Count; i++) { IReference <RuntimeHierarchyObj> reference = this.m_hierarchyObjs[i]; using (reference.PinValue()) { RuntimeHierarchyObj runtimeHierarchyObj = reference.Value(); if (!flag || runtimeHierarchyObj is RuntimeGroupLeafObj) { ((RuntimeGroupLeafObj)runtimeHierarchyObj).TraverseAllLeafNodes(ProcessingStages.RunningValues, aggContext); flag = false; } } } } }
public RuntimeGroupingObjLinkedList(RuntimeHierarchyObj owner, AspNetCore.ReportingServices.ReportProcessing.ObjectType objectType) : base(owner, objectType) { }
public override void NextRow(object keyValue, bool hasParent, object parentKey) { IReference <RuntimeHierarchyObj> reference = null; try { this.m_hashtable.TryGetValue(keyValue, out reference); } catch (ReportProcessingException_SpatialTypeComparisonError reportProcessingException_SpatialTypeComparisonError) { throw new ReportProcessingException(base.m_owner.RegisterSpatialTypeComparisonError(reportProcessingException_SpatialTypeComparisonError.Type)); } catch (ReportProcessingException_ComparisonError e) { throw new ReportProcessingException(base.m_owner.RegisterComparisonError("GroupExpression", e)); } if (reference != null) { using (reference.PinValue()) { reference.Value().NextRow(); } } else { RuntimeHierarchyObj runtimeHierarchyObj = new RuntimeHierarchyObj(base.m_owner, base.m_objectType, ((IScope)base.m_owner).Depth + 1); reference = (IReference <RuntimeHierarchyObj>)runtimeHierarchyObj.SelfReference; try { this.m_hashtable.Add(keyValue, reference); runtimeHierarchyObj = reference.Value(); runtimeHierarchyObj.NextRow(); if (hasParent) { IReference <RuntimeHierarchyObj> reference2 = null; IReference <RuntimeGroupLeafObj> reference3 = null; try { this.m_hashtable.TryGetValue(parentKey, out reference2); } catch (ReportProcessingException_SpatialTypeComparisonError reportProcessingException_SpatialTypeComparisonError2) { throw new ReportProcessingException(base.m_owner.RegisterSpatialTypeComparisonError(reportProcessingException_SpatialTypeComparisonError2.Type)); } catch (ReportProcessingException_ComparisonError e2) { throw new ReportProcessingException(base.m_owner.RegisterComparisonError("Parent", e2)); } if (reference2 != null) { RuntimeHierarchyObj runtimeHierarchyObj2 = reference2.Value(); Global.Tracer.Assert(null != runtimeHierarchyObj2.HierarchyObjs, "(null != parentHierarchyObj.HierarchyObjs)"); reference3 = (RuntimeGroupLeafObjReference)runtimeHierarchyObj2.HierarchyObjs[0]; } Global.Tracer.Assert(null != runtimeHierarchyObj.HierarchyObjs, "(null != hierarchyObj.HierarchyObjs)"); RuntimeGroupLeafObjReference runtimeGroupLeafObjReference = (RuntimeGroupLeafObjReference)runtimeHierarchyObj.HierarchyObjs[0]; bool addToWaitList = true; if (reference3 == runtimeGroupLeafObjReference) { reference3 = null; addToWaitList = false; } this.ProcessChildren(keyValue, reference3, runtimeGroupLeafObjReference); this.ProcessParent(parentKey, reference3, runtimeGroupLeafObjReference, addToWaitList); } } finally { reference.UnPinValue(); } } }
public void SetOwner(RuntimeHierarchyObj owner) { this.m_owner = owner; }
public RuntimeGroupingObj(RuntimeHierarchyObj owner, AspNetCore.ReportingServices.ReportProcessing.ObjectType objectType) { this.m_owner = owner; this.m_objectType = objectType; }