コード例 #1
0
        public void Application_Start(object sender, EventArgs e)
        {
            // 在应用程序启动时运行的代码
            AreaRegistration.RegisterAllAreas();

            RegisterGlobalFilters(GlobalFilters.Filters);
            RegisterRoutes(RouteTable.Routes);
            ValidatorRegister.RegisterAdapter();
            CacheProvider.Register(new HttpCache());
            string rootPath = Server.MapPath("~/");

            IOFactory.Register(new LocalStoreFile(rootPath), new LocalFolder(rootPath));
            ConfigSerializer.Register(new ConfigSerializer(rootPath));
        }