protected void DecompileConstructorChain(MethodDefinition method, ILanguage language, DecompiledType decompiledType) { if (this.cacheService.IsDecompiledMemberInCache(method, language, this.renameInvalidMembers)) { V_3 = this.cacheService.GetDecompiledMemberFromCache(method, language, this.renameInvalidMembers); this.AddDecompiledMemberToDecompiledType(V_3, decompiledType); BaseWriterContextService.AddAssignmentDataToDecompiledType(V_3, decompiledType); return; } if (method.get_Body() == null) { V_4 = new CachedDecompiledMember(new DecompiledMember(Utilities.GetMemberUniqueName(method), null, null)); this.cacheService.AddDecompiledMemberToCache(method, language, this.renameInvalidMembers, V_4); return; } V_0 = this.DecompileMethod(language, method, decompiledType.get_TypeContext().ShallowPartialClone()); V_1 = new List <CachedDecompiledMember>(); V_2 = method.get_DeclaringType(); if (!method.get_IsStatic()) { V_5 = V_2.get_Methods().GetEnumerator(); try { while (V_5.MoveNext()) { V_6 = V_5.get_Current(); if (!V_6.get_IsConstructor() || String.op_Equality(V_6.get_FullName(), V_0.get_Member().get_MemberFullName()) || V_6.get_IsStatic()) { continue; } if (V_6.get_Body() != null) { V_1.Add(this.DecompileMethod(language, V_6, decompiledType.get_TypeContext().ShallowPartialClone())); } else { V_7 = new CachedDecompiledMember(new DecompiledMember(Utilities.GetMemberUniqueName(V_6), null, null)); V_1.Add(V_7); } } } finally { V_5.Dispose(); } V_1.Add(V_0); this.MergeConstructorsTypeContexts(V_1, decompiledType); V_8 = V_1.GetEnumerator(); try { while (V_8.MoveNext()) { V_9 = new BaseWriterContextService.u003cu003ec__DisplayClass15_0(); V_9.constructor = V_8.get_Current(); if (language as IntermediateLanguage == null) { this.RemoveBaseCtorInvocationStatements(V_9.constructor, decompiledType); } if (V_9.constructor.get_Member().get_Context() != null) { if (!this.cacheService.IsDecompiledMemberInCache(V_9.constructor.get_Member().get_Context().get_Method(), language, this.renameInvalidMembers)) { this.cacheService.AddDecompiledMemberToCache(V_9.constructor.get_Member().get_Context().get_Method(), language, this.renameInvalidMembers, V_9.constructor); } } else { V_10 = decompiledType.get_Type().get_Methods().First <MethodDefinition>(new Func <MethodDefinition, bool>(V_9.u003cDecompileConstructorChainu003eb__0)); if (!this.cacheService.IsDecompiledMemberInCache(V_10, language, this.renameInvalidMembers)) { this.cacheService.AddDecompiledMemberToCache(V_10, language, this.renameInvalidMembers, V_9.constructor); } } this.AddDecompiledMemberToDecompiledType(V_9.constructor, decompiledType); } } finally { ((IDisposable)V_8).Dispose(); } } return; }
public void FixCases(SwitchStatement theSwitch) { V_0 = new FixSwitchCasesStep.u003cu003ec__DisplayClass0_0(); V_1 = theSwitch.get_Cases().LastOrDefault <SwitchCase>() as DefaultCase; V_2 = 0; V_3 = null; if (V_1 != null && !this.TryGetSimpleCaseStatementType(V_1, out V_2, out V_3)) { return; } V_0.casesToRemove = new HashSet <SwitchCase>(); V_4 = new List <SwitchCase>(theSwitch.get_Cases()); V_5 = V_4.GetEnumerator(); try { while (V_5.MoveNext()) { V_6 = V_5.get_Current(); if (V_6 != V_1) { if (V_6.get_Body() != null) { if (this.TryGetSimpleCaseStatementType(V_6, out V_7, out V_8)) { if (V_1 == null) { if (V_7 == 2) { dummyVar2 = V_0.casesToRemove.Add(V_6); goto Label0; } } else { if (V_2 == V_7 && String.op_Equality(V_3, V_8)) { dummyVar1 = V_0.casesToRemove.Add(V_6); goto Label0; } } } V_0.casesToRemove.Clear(); } else { dummyVar0 = V_0.casesToRemove.Add(V_6); } } else { goto Label0; } } } finally { ((IDisposable)V_5).Dispose(); } Label0: if (V_0.casesToRemove.get_Count() > 0) { theSwitch.set_Cases(V_4.Where <SwitchCase>(new Func <SwitchCase, bool>(V_0.u003cFixCasesu003eb__0))); } return; }