protected virtual ClassHierarchyNode FindLowestCommonAncestor(ICollection <ClassHierarchyNode> typeNodes) { V_0 = 0; V_1 = null; V_4 = typeNodes.GetEnumerator(); try { while (V_4.MoveNext()) { V_0 = V_0 + 1; V_1 = V_4.get_Current(); } } finally { if (V_4 != null) { V_4.Dispose(); } } if (V_0 == 1) { return(V_1); } V_2 = new Queue <ClassHierarchyNode>(); V_3 = new HashSet <ClassHierarchyNode>(); V_4 = typeNodes.GetEnumerator(); try { while (V_4.MoveNext()) { V_5 = V_4.get_Current(); if (V_2.get_Count() != 0) { V_10 = V_5; while (!V_3.Contains(V_10)) { stackVariable28 = V_5.get_CanAssignTo(); stackVariable29 = TypeInferer.u003cu003ec.u003cu003e9__18_0; if (stackVariable29 == null) { dummyVar1 = stackVariable29; stackVariable29 = new Func <ClassHierarchyNode, bool>(TypeInferer.u003cu003ec.u003cu003e9.u003cFindLowestCommonAncestoru003eb__18_0); TypeInferer.u003cu003ec.u003cu003e9__18_0 = stackVariable29; } if (stackVariable28.Count <ClassHierarchyNode>(stackVariable29) <= 1) { stackVariable33 = V_10.get_CanAssignTo(); stackVariable34 = TypeInferer.u003cu003ec.u003cu003e9__18_1; if (stackVariable34 == null) { dummyVar2 = stackVariable34; stackVariable34 = new Func <ClassHierarchyNode, bool>(TypeInferer.u003cu003ec.u003cu003e9.u003cFindLowestCommonAncestoru003eb__18_1); TypeInferer.u003cu003ec.u003cu003e9__18_1 = stackVariable34; } V_10 = stackVariable33.FirstOrDefault <ClassHierarchyNode>(stackVariable34); } else { V_11 = null; goto Label1; } } while (V_2.Peek() != V_10) { dummyVar3 = V_3.Remove(V_2.Dequeue()); } } else { V_6 = V_5; while (V_6 != null) { V_2.Enqueue(V_6); dummyVar0 = V_3.Add(V_6); V_7 = null; V_8 = V_6.get_CanAssignTo().GetEnumerator(); try { while (V_8.MoveNext()) { V_9 = V_8.get_Current(); if (!V_9.get_IsHardNode()) { continue; } V_7 = V_9; goto Label2; } } finally { if (V_8 != null) { V_8.Dispose(); } } Label2: V_6 = V_7; } } } goto Label0; } finally { if (V_4 != null) { V_4.Dispose(); } } Label1: return(V_11); Label0: return(V_2.Peek()); }
private void RedirectConstraints() { V_0 = new List <KeyValuePair <ClassHierarchyNode, ClassHierarchyNode> >(); V_1 = this.get_ContainedNodes().GetEnumerator(); try { while (V_1.MoveNext()) { V_2 = V_1.get_Current(); V_3 = V_2.get_CanAssignTo().GetEnumerator(); try { while (V_3.MoveNext()) { V_4 = V_3.get_Current(); if (this.get_ContainedNodes().Contains(V_4)) { continue; } if (!V_4.get_IsHardNode() || !V_4.get_NodeType().get_IsPrimitive() || !V_2.get_IsHardNode() || this.IsAssignable(V_2.get_NodeType(), V_4.get_NodeType())) { V_0.Add(new KeyValuePair <ClassHierarchyNode, ClassHierarchyNode>(V_2, V_4)); } else { dummyVar0 = V_4.get_SubTypes().Remove(V_2); } } } finally { if (V_3 != null) { V_3.Dispose(); } } } } finally { if (V_1 != null) { V_1.Dispose(); } } V_5 = V_0.GetEnumerator(); try { while (V_5.MoveNext()) { V_6 = V_5.get_Current(); V_7 = V_6.get_Key(); V_8 = V_6.get_Value(); this.get_CanAssignTo().Add(V_8); dummyVar1 = V_7.get_CanAssignTo().Remove(V_8); dummyVar2 = V_8.get_SubTypes().Remove(V_7); if (V_8.get_SubTypes().Contains(this)) { continue; } V_8.get_SubTypes().Add(this); } } finally { ((IDisposable)V_5).Dispose(); } V_0 = new List <KeyValuePair <ClassHierarchyNode, ClassHierarchyNode> >(); V_1 = this.get_ContainedNodes().GetEnumerator(); try { while (V_1.MoveNext()) { V_9 = V_1.get_Current(); V_3 = V_9.get_SubTypes().GetEnumerator(); try { while (V_3.MoveNext()) { V_10 = V_3.get_Current(); if (this.get_ContainedNodes().Contains(V_10)) { continue; } if (!V_10.get_IsHardNode() || !V_10.get_NodeType().get_IsPrimitive() || !V_9.get_IsHardNode() || this.IsAssignable(V_10.get_NodeType(), V_9.get_NodeType())) { V_0.Add(new KeyValuePair <ClassHierarchyNode, ClassHierarchyNode>(V_9, V_10)); } else { dummyVar3 = V_10.get_CanAssignTo().Remove(V_9); } } } finally { if (V_3 != null) { V_3.Dispose(); } } } } finally { if (V_1 != null) { V_1.Dispose(); } } V_5 = V_0.GetEnumerator(); try { while (V_5.MoveNext()) { V_11 = V_5.get_Current(); V_12 = V_11.get_Key(); V_13 = V_11.get_Value(); this.get_SubTypes().Add(V_13); dummyVar4 = V_12.get_SubTypes().Remove(V_13); dummyVar5 = V_13.get_CanAssignTo().Remove(V_12); if (V_13.get_CanAssignTo().Contains(this)) { continue; } V_13.get_CanAssignTo().Add(this); } } finally { ((IDisposable)V_5).Dispose(); } return; }