public RepositoryResponse<string> ProcessSelectedExportDataAsync() { UnitOfWorkHelper<MixCmsContext>.InitTransaction(null, null, ref V_0, ref V_1, ref V_2); stackVariable5 = new RepositoryResponse<string>(); stackVariable5.set_IsSucceed(true); V_3 = stackVariable5; try { try { this.ProcessPages(V_0, V_1); this.ProcessModules(V_0, V_1); this.ProcessAttributeSetsAsync(V_0, V_1); this.ProcessAttributeSetData(V_0, V_1); this.ProcessDatas(V_0, V_1); V_4 = V_3; } catch (Exception exception_0) { V_5 = exception_0; V_6 = UnitOfWorkHelper<MixCmsContext>.HandleException<Mix.Cms.Lib.ViewModels.MixPages.ImportViewModel>(V_5, V_2, V_1); V_3.set_IsSucceed(false); V_3.set_Errors(V_6.get_Errors()); V_3.set_Exception(V_5); V_4 = V_3; } } finally { if (V_2) { RelationalDatabaseFacadeExtensions.CloseConnection(V_0.get_Database()); V_1.Dispose(); V_0.Dispose(); } } return V_4; }
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; }