首页 > Web开发 > 详细

WebActivatorEx

时间:2016-01-12 09:53:48      阅读:698      评论:0      收藏:0      [点我收藏+]
using System;
using NLog;
using System.Web.Optimization;

    
[assembly: WebActivatorEx.PreApplicationStartMethod(typeof(Penseesoft.Web.Setting.App_Start.BundleTableSetting), "PreStart")]
[assembly: WebActivatorEx.PostApplicationStartMethod(typeof(Penseesoft.Web.Setting.App_Start.BundleTableSetting), "PostStart")]
namespace Penseesoft.Web.Setting.App_Start
{
    
    public static class BundleTableSetting
    {
    
        public static void PreStart()
        {
            
            LogManager.GetCurrentClassLogger().Trace("PreStart");
            BundleTable.EnableOptimizations = false;
            LogManager.GetCurrentClassLogger().Trace("BundleTable.EnableOptimizations is false");
        }
        public static void PostStart()
        {
            
            LogManager.GetCurrentClassLogger().Trace("PostStart");
        }
    }
}
WebActivatorEx的用法,
assembly的Attribute不能包含在namespace内,为了这个弄了几小时orz

WebActivatorEx

原文:http://www.cnblogs.com/peteryu007/p/5123353.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!