コード例 #1
0
ファイル: BundleConfig.cs プロジェクト: tomatoe45/ASAdmin
 private static void BundleConfig_SettingCacheLoaded(object sender, SettingsCacheLoadedEventArgs e)
 {
     if (e.SettingValues.Contains("BundlingEnabled"))
     {
         BundleTable.EnableOptimizations = bool.Parse((e.SettingValues["BundlingEnabled"] as AppSetting).Value);
     }
 }
コード例 #2
0
        private static void AppSettings_SettingCacheLoaded(object sender, SettingsCacheLoadedEventArgs e)
        {
            if (e.SettingValues.Contains("DbQueryLogEnable"))
            {
                ASDbCommandInterceptor interceptor = ServiceLocator.Current.Resolve <ASDbCommandInterceptor>();

                if (bool.Parse((e.SettingValues["DbQueryLogEnable"] as AppSetting).Value))
                {
                    DbInterception.Add(interceptor);
                }
                else
                {
                    DbInterception.Remove(interceptor);
                }
            }
        }