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 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(); } } }