private void ProcessChildren(object thisKey, IReference <RuntimeGroupLeafObj> parentObj, IReference <RuntimeGroupLeafObj> thisObj) { ChildLeafInfo value = null; if (m_parentInfo != null) { m_parentInfo.TryGetValue(thisKey, out value); } if (value == null) { return; } for (int i = 0; i < value.Count; i++) { RuntimeGroupLeafObjReference runtimeGroupLeafObjReference = value[i]; using (runtimeGroupLeafObjReference.PinValue()) { RuntimeGroupLeafObj runtimeGroupLeafObj = runtimeGroupLeafObjReference.Value(); bool flag = false; IReference <RuntimeGroupObj> reference = parentObj as IReference <RuntimeGroupObj>; while (reference != null && !flag) { RuntimeGroupLeafObj runtimeGroupLeafObj2 = reference.Value() as RuntimeGroupLeafObj; if (runtimeGroupLeafObj2 == runtimeGroupLeafObj) { flag = true; } reference = runtimeGroupLeafObj2?.Parent; } if (!flag) { runtimeGroupLeafObj.RemoveFromParent((RuntimeGroupRootObjReference)m_owner.SelfReference); using (thisObj.PinValue()) { thisObj.Value().AddChild(runtimeGroupLeafObjReference); } } } } m_parentInfo.Remove(thisKey); }
internal override void NextRow(object keyValue, bool hasParent, object parentKey) { IReference <RuntimeHierarchyObj> value = null; try { m_hashtable.TryGetValue(keyValue, out value); } catch (ReportProcessingException_SpatialTypeComparisonError reportProcessingException_SpatialTypeComparisonError) { throw new ReportProcessingException(m_owner.RegisterSpatialTypeComparisonError(reportProcessingException_SpatialTypeComparisonError.Type)); } catch (ReportProcessingException_ComparisonError e) { throw new ReportProcessingException(m_owner.RegisterComparisonError("GroupExpression", e)); } if (value != null) { using (value.PinValue()) { value.Value().NextRow(); } return; } RuntimeHierarchyObj runtimeHierarchyObj = new RuntimeHierarchyObj(m_owner, m_objectType, ((IScope)m_owner).Depth + 1); value = (IReference <RuntimeHierarchyObj>)runtimeHierarchyObj.SelfReference; try { m_hashtable.Add(keyValue, value); runtimeHierarchyObj = value.Value(); runtimeHierarchyObj.NextRow(); if (hasParent) { IReference <RuntimeHierarchyObj> value2 = null; IReference <RuntimeGroupLeafObj> reference = null; try { m_hashtable.TryGetValue(parentKey, out value2); } catch (ReportProcessingException_SpatialTypeComparisonError reportProcessingException_SpatialTypeComparisonError2) { throw new ReportProcessingException(m_owner.RegisterSpatialTypeComparisonError(reportProcessingException_SpatialTypeComparisonError2.Type)); } catch (ReportProcessingException_ComparisonError e2) { throw new ReportProcessingException(m_owner.RegisterComparisonError("Parent", e2)); } if (value2 != null) { RuntimeHierarchyObj runtimeHierarchyObj2 = value2.Value(); Global.Tracer.Assert(runtimeHierarchyObj2.HierarchyObjs != null, "(null != parentHierarchyObj.HierarchyObjs)"); reference = (RuntimeGroupLeafObjReference)runtimeHierarchyObj2.HierarchyObjs[0]; } Global.Tracer.Assert(runtimeHierarchyObj.HierarchyObjs != null, "(null != hierarchyObj.HierarchyObjs)"); RuntimeGroupLeafObjReference runtimeGroupLeafObjReference = (RuntimeGroupLeafObjReference)runtimeHierarchyObj.HierarchyObjs[0]; bool addToWaitList = true; if (reference == runtimeGroupLeafObjReference) { reference = null; addToWaitList = false; } ProcessChildren(keyValue, reference, runtimeGroupLeafObjReference); ProcessParent(parentKey, reference, runtimeGroupLeafObjReference, addToWaitList); } } finally { value.UnPinValue(); } }
internal bool TryGetValue(object key, out LookupMatches matches) { return(m_table.TryGetValue(key, out matches)); }