public static void LoadFromDatabase(MixCmsContext _context = null, IDbContextTransaction _transaction = null) { UnitOfWorkHelper <MixCmsContext> .InitTransaction(_context, _transaction, ref V_0, ref V_1, ref V_2); try { try { MixService.get_Instance().set_Translator(new JObject()); V_3 = V_0.get_MixLanguage().ToList <MixLanguage>(); V_4 = V_0.get_MixCulture().ToList <MixCulture>(); V_6 = V_4.GetEnumerator(); try { while (V_6.MoveNext()) { V_7 = new MixService.u003cu003ec__DisplayClass63_0(); V_7.culture = V_6.get_Current(); V_8 = new JObject(); stackVariable22 = V_3; stackVariable24 = V_7.u003cu003e9__0; if (stackVariable24 == null) { dummyVar0 = stackVariable24; stackVariable50 = new Func <MixLanguage, bool>(V_7.u003cLoadFromDatabaseu003eb__0); V_10 = stackVariable50; V_7.u003cu003e9__0 = stackVariable50; stackVariable24 = V_10; } V_9 = stackVariable22.Where <MixLanguage>(stackVariable24).ToList <MixLanguage>().GetEnumerator(); try { while (V_9.MoveNext()) { V_11 = V_9.get_Current(); stackVariable33 = V_11.get_Keyword(); stackVariable35 = V_11.get_Value(); if (stackVariable35 == null) { dummyVar1 = stackVariable35; stackVariable35 = V_11.get_DefaultValue(); } V_8.Add(new JProperty(stackVariable33, stackVariable35)); } } finally { ((IDisposable)V_9).Dispose(); } MixService.get_Instance().get_Translator().Add(new JProperty(V_7.culture.get_Specificulture(), V_8)); } } finally { ((IDisposable)V_6).Dispose(); } MixService.get_Instance().set_LocalSettings(new JObject()); V_5 = V_0.get_MixConfiguration().ToList <MixConfiguration>(); V_6 = V_4.GetEnumerator(); try { while (V_6.MoveNext()) { V_13 = new MixService.u003cu003ec__DisplayClass63_1(); V_13.culture = V_6.get_Current(); V_14 = new JObject(); stackVariable65 = V_5; stackVariable67 = V_13.u003cu003e9__1; if (stackVariable67 == null) { dummyVar2 = stackVariable67; stackVariable92 = new Func <MixConfiguration, bool>(V_13.u003cLoadFromDatabaseu003eb__1); V_16 = stackVariable92; V_13.u003cu003e9__1 = stackVariable92; stackVariable67 = V_16; } V_15 = stackVariable65.Where <MixConfiguration>(stackVariable67).ToList <MixConfiguration>().GetEnumerator(); try { while (V_15.MoveNext()) { V_17 = V_15.get_Current(); V_18 = new JProperty(V_17.get_Keyword(), V_17.get_Value()); V_14.Add(V_18); } } finally { ((IDisposable)V_15).Dispose(); } MixService.get_Instance().get_LocalSettings().Add(new JProperty(V_13.culture.get_Specificulture(), V_14)); } } finally { ((IDisposable)V_6).Dispose(); } UnitOfWorkHelper <MixCmsContext> .HandleTransaction(true, V_2, V_1); } catch (Exception exception_0) { dummyVar3 = UnitOfWorkHelper <MixCmsContext> .HandleException <MixLanguage>(exception_0, V_2, V_1); } } finally { if (V_2) { RelationalDatabaseFacadeExtensions.CloseConnection(V_0.get_Database()); V_1.Dispose(); V_0.Dispose(); } } 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; }