private void CreateSwitchConstruct(CFGBlockLogicalConstruct switchBlock, ILogicalConstruct parentConstruct, SwitchData switchData, DominatorTree dominatorTree) { stackVariable2 = this.GetOrderedCFGSuccessorToLabelsMap(switchData); V_0 = this.GetValidCases(dominatorTree, switchBlock); V_1 = new List <CaseLogicalConstruct>(); V_2 = new PairList <List <int>, CFGBlockLogicalConstruct>(); V_8 = stackVariable2.GetEnumerator(); try { while (V_8.MoveNext()) { V_9 = V_8.get_Current(); if (!LogicalFlowUtilities.TryGetParentConstructWithGivenParent(V_9.get_Key(), parentConstruct, out V_10) || !V_0.TryGetValue(V_10, out V_11)) { V_2.Add(V_9.get_Value(), V_9.get_Key()); } else { V_12 = new CaseLogicalConstruct(V_10); V_12.get_CaseNumbers().AddRange(V_9.get_Value()); V_12.get_Body().UnionWith(V_11.Cast <ILogicalConstruct>()); V_12.AttachCaseConstructToGraph(); V_1.Add(V_12); } } } finally { ((IDisposable)V_8).Dispose(); } V_3 = null; V_4 = this.GetCFGLogicalConstructFromBlock(switchData.get_DefaultCase()); if (LogicalFlowUtilities.TryGetParentConstructWithGivenParent(V_4, parentConstruct, out V_5) && V_0.TryGetValue(V_5, out V_6)) { V_3 = new CaseLogicalConstruct(V_5); if (this.HasSuccessors(V_6)) { V_3.get_Body().UnionWith(V_6.Cast <ILogicalConstruct>()); } V_3.AttachCaseConstructToGraph(); } V_7 = SwitchLogicalConstruct.GroupInSwitchConstruct(switchBlock, V_1, V_2, V_3, V_4); this.UpdateDominatorTree(dominatorTree, V_7); return; }
private void Preprocess() { V_0 = 0; V_1 = new Dictionary <ParameterDefinition, string>(); V_2 = this.methodContext.get_ParameterDefinitionToNameMap().GetEnumerator(); try { while (V_2.MoveNext()) { V_3 = V_2.get_Current(); V_4 = V_3.get_Key(); V_5 = V_3.get_Value(); V_6 = V_5; V_7 = !V_6.IsValidIdentifier(); while (V_7 || this.HasMethodParameterWithSameName(V_6)) { V_7 = false; stackVariable22 = V_0; V_0 = stackVariable22 + 1; V_8 = stackVariable22; V_6 = String.Concat("argument", V_8.ToString()); } if (!String.op_Inequality(V_6, V_5)) { continue; } V_1.Add(V_4, V_6); } } finally { ((IDisposable)V_2).Dispose(); } V_2 = V_1.GetEnumerator(); try { while (V_2.MoveNext()) { V_9 = V_2.get_Current(); this.methodContext.get_ParameterDefinitionToNameMap().set_Item(V_9.get_Key(), V_9.get_Value()); } } finally { ((IDisposable)V_2).Dispose(); } V_10 = this.methodContext.get_Body().get_Method().get_Parameters().GetEnumerator(); try { while (V_10.MoveNext()) { V_11 = V_10.get_Current(); V_12 = V_11.get_Name(); if (String.IsNullOrEmpty(V_12)) { V_12 = this.GetNameByType(V_11.get_ParameterType()); } this.methodContext.get_ParameterDefinitionToNameMap().Add(V_11, V_12); } } finally { V_10.Dispose(); } if (this.methodContext.get_Method().get_IsSetter() && this.methodContext.get_Method().get_Parameters().get_Count() == 1) { V_13 = this.methodContext.get_Method().get_Parameters().get_Item(0); this.methodContext.get_ParameterDefinitionToNameMap().set_Item(V_13, "value"); } V_14 = this.methodContext.get_Body().get_Variables().GetEnumerator(); try { while (V_14.MoveNext()) { V_15 = V_14.get_Current(); if (!this.methodContext.get_ParameterDefinitionToNameMap().ContainsValue(V_15.get_Name())) { continue; } dummyVar0 = this.methodContext.get_VariablesToRename().Add(V_15); } } finally { V_14.Dispose(); } V_16 = this.methodContext.get_VariableDefinitionToNameMap().GetEnumerator(); try { while (V_16.MoveNext()) { V_17 = V_16.get_Current(); if (!this.methodContext.get_ParameterDefinitionToNameMap().ContainsValue(V_17.get_Value())) { continue; } dummyVar1 = this.methodContext.get_VariablesToRename().Add(V_17.get_Key()); } } finally { ((IDisposable)V_16).Dispose(); } return; }