Summary description for BundleConfig
Ejemplo n.º 1
0
        protected override void OnApplicationStarted()
        {
            base.OnApplicationStarted();
            AreaRegistration.RegisterAllAreas();

            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);

            WebSecurityInitialization.Initialize();

            Logger.LogInformation("Application started.");
        }
Ejemplo n.º 2
0
        void Application_Start(object sender, EventArgs e)
        {
            // Code that runs on application startup
            AreaRegistration.RegisterAllAreas();
            GlobalConfiguration.Configure(WebApiConfig.Register);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);


            var config = new HttpConfiguration();

            //ConfigureCamelCase(config);
        }
 public void TestBundleTable()
 {
     try
     {
         BundleConfig.RegisterBundles(System.Web.Optimization.BundleTable.Bundles);
         Assert.IsTrue(true);
     }
     catch
     {
         // Assert
         Assert.IsTrue(false);
         throw;
     }
 }
Ejemplo n.º 4
0
 protected void Application_Start()
 {
     AreaRegistration.RegisterAllAreas();
     GlobalConfiguration.Configure(WebApiConfig.Register);
     FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
     RouteConfig.RegisterRoutes(RouteTable.Routes);
     BundleConfig.RegisterBundles(BundleTable.Bundles);
     GlobalConfiguration.Configuration.Formatters.Clear();
     GlobalConfiguration.Configuration.Formatters.Add(new JsonpMediaTypeFormatter(new JsonMediaTypeFormatter()));
     //var json = GlobalConfiguration.Configuration.Formatters.JsonFormatter.SerializerSettings;
     //json.ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore;
     //json.DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc;
     //GlobalConfiguration.Configuration.Formatters.Remove(GlobalConfiguration.Configuration.Formatters.XmlFormatter);
 }
Ejemplo n.º 5
0
 void AddPiercingeyeConfig()
 {
     if (Application.isEditor)
     {
         string[] pathArray = new string[] { EditordirPath + "/piercingeyeres/piercingeye", EditordirPath + "/hero_effectres/hero_effect" };
         string[] typeArray = new string[] { "Piercingeye", "heroeffect" };
         PiercingeyeConfig = new BundleConfig(pathArray, typeArray);
     }
     else
     {
         string[] pathArray = new string[] { MobiledirPath + "/piercingeyeres/piercingeye", MobiledirPath + "/hero_effectres/hero_effect" };
         string[] typeArray = new string[] { "Piercingeye", "heroeffect" };
         PiercingeyeConfig = new BundleConfig(pathArray, typeArray);
     }
 }
Ejemplo n.º 6
0
 void AddSpriteConfig()
 {
     if (Application.isEditor)
     {
         string[] pathArray = new string[] { EditordirPath + "/spriteres/sprite", EditordirPath + "/hero_effectres/hero_effect" };
         string[] typeArray = new string[] { "sprite", "heroeffect" };
         SpriteConfig = new BundleConfig(pathArray, typeArray);
     }
     else
     {
         string[] pathArray = new string[] { MobiledirPath + "/spriteres/sprite", MobiledirPath + "/hero_effectres/hero_effect" };
         string[] typeArray = new string[] { "sprite", "heroeffect" };
         SpriteConfig = new BundleConfig(pathArray, typeArray);
     }
 }
Ejemplo n.º 7
0
 void AddGoldhoopbarConfig()
 {
     if (Application.isEditor)
     {
         string[] pathArray = new string[] { EditordirPath + "/goldhoopbares/goldhoopbar", EditordirPath + "/hero_effectres/hero_effect" };
         string[] typeArray = new string[] { "goldhoopbar", "heroeffect" };
         GoldhoopbarConfig = new BundleConfig(pathArray, typeArray);
     }
     else
     {
         string[] pathArray = new string[] { MobiledirPath + "/goldhoopbares/goldhoopbar", MobiledirPath + "/hero_effectres/hero_effect" };
         string[] typeArray = new string[] { "goldhoopbar", "heroeffect" };
         GoldhoopbarConfig = new BundleConfig(pathArray, typeArray);
     }
 }
Ejemplo n.º 8
0
 void AddBaibianHuluConfig()
 {
     if (Application.isEditor)
     {
         string[] pathArray = new string[] { EditordirPath + "/baibianhulures/baibianhulu", EditordirPath + "/hero_effectres/hero_effect" };
         string[] typeArray = new string[] { "baibianhulu", "heroeffect" };
         BaibianHuluConfig = new BundleConfig(pathArray, typeArray);
     }
     else
     {
         string[] pathArray = new string[] { MobiledirPath + "/baibianhulures/baibianhulu", MobiledirPath + "/hero_effectres/hero_effect" };
         string[] typeArray = new string[] { "baibianhulu", "heroeffect" };
         BaibianHuluConfig = new BundleConfig(pathArray, typeArray);
     }
 }
Ejemplo n.º 9
0
        void Application_Start(object sender, EventArgs e)
        {
            // Code that runs on application startup
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);

            // Initialize the product database.
            Database.SetInitializer(new ProductDatabaseInitializer());

            // Create the administrator role and user.
            RoleActions roleActions = new RoleActions();

            roleActions.createAdmin();

            // Add Routes.
            RegisterCustomRoutes(RouteTable.Routes);
        }
Ejemplo n.º 10
0
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();

			GlobalConfiguration.Configure(WebApiConfig.Register);

			FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);

            // Remove data annotations validation provider 
            ModelValidatorProviders.Providers.Remove(
                ModelValidatorProviders.Providers.OfType<DataAnnotationsModelValidatorProvider>().First());

			DependencyInjection();

		}
Ejemplo n.º 11
0
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();
            RouteConfig.RegisterRoutes(RouteTable.Routes);

            //AutoFac
            var builder = new ContainerBuilder();

            builder.RegisterControllers(typeof(MvcApplication).Assembly);
            builder.RegisterType <DataProvider>().As <IDataProvider>();

            IContainer container = builder.Build();

            DependencyResolver.SetResolver(new AutofacDependencyResolver(container));

            //Банглы
            BundleConfig.RegisterBundles(BundleTable.Bundles);
        }
Ejemplo n.º 12
0
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);


            var builder = new ContainerBuilder();

            builder.RegisterControllers(typeof(MvcApplication).Assembly);
            builder.RegisterModelBinders(typeof(MvcApplication).Assembly);
            builder.RegisterModelBinderProvider();

            builder.RegisterType <EmployeeRepository>().As <IEmployeeRepository>().InstancePerRequest();

            var container = builder.Build();

            DependencyResolver.SetResolver(new AutofacDependencyResolver(container));
        }
    //生成游戏中使用的配置文件
    public void CreatBundelPackageConfig()
    {
        Dictionary <string, SingleField> gameConfig = new Dictionary <string, SingleField>();

        Dictionary <string, BundleConfig> gameRelyBundles = new Dictionary <string, BundleConfig>();

        for (int i = 0; i < relyPackages.Count; i++)
        {
            //生成游戏中使用的依赖包数据
            BundleConfig pack = new BundleConfig();
            pack.name         = relyPackages[i].name;
            pack.path         = relyPackages[i].path;
            pack.relyPackages = new string[0];
            pack.md5          = MD5Tool.GetFileMD5(GetExportPath(pack.path, pack.name)); //获取bundle包的md5
            pack.loadType     = ResLoadType.Streaming;                                   //默认放在沙盒路径下

            gameRelyBundles.Add(pack.name, pack);
        }

        Dictionary <string, BundleConfig> gameAssetsBundles = new Dictionary <string, BundleConfig>();

        for (int i = 0; i < bundles.Count; i++)
        {
            //生成游戏中使用的bundle包数据
            BundleConfig pack = new BundleConfig();
            pack.name         = bundles[i].name;
            pack.path         = bundles[i].path;
            pack.relyPackages = GetRelyPackNames(bundles[i].relyPackagesMask);           //获取依赖包的名字
            pack.md5          = MD5Tool.GetFileMD5(GetExportPath(pack.path, pack.name)); //获取bundle包的md5
            pack.loadType     = ResLoadType.Streaming;                                   //默认放在沙盒路径下

            gameAssetsBundles.Add(pack.name, pack);
        }

        gameConfig.Add(BundleConfigManager.key_relyBundle, new SingleField(JsonTool.Dictionary2Json <BundleConfig>(gameRelyBundles)));
        gameConfig.Add(BundleConfigManager.key_bundles, new SingleField(JsonTool.Dictionary2Json <BundleConfig>(gameAssetsBundles)));

        //保存游戏中读取的配置文件
        ConfigManager.SaveData(BundleConfigManager.configFileName, gameConfig);
        AssetDatabase.Refresh();
    }
Ejemplo n.º 14
0
        protected void Application_Start()
        {
            GlobalConfig.SetRoot(HostingEnvironment.MapPath("~/Configs/"));

            var environment = ConfigurationManager.AppSettings["Environment"];

            if (string.IsNullOrWhiteSpace(environment))
            {
                GlobalConfig.SetEnvironment("Local");
            }
            else
            {
                GlobalConfig.SetEnvironment(environment);
            }

            AreaRegistration.RegisterAllAreas();

            WebApiConfig.Register(GlobalConfiguration.Configuration);
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);
        }
Ejemplo n.º 15
0
        public void GenConfig(BundleConfig config)
        {
            if (string.IsNullOrEmpty(BundleName))
            {
                return;
            }
            if (config.ContainsBundle(BundleName))
            {
                return;
            }
            BundleInfo info = new BundleInfo();

            info.path     = BundleName;
            info.mainName = GetAssetName();
            info.type     = GetAssetType();
            if (null != depends)
            {
                info.depends = depends
                               .Where(dep => !string.IsNullOrEmpty(dep.BundleName))
                               .Select(dep => dep.BundleName).ToArray();
            }
            config.AddBundle(info);
        }
Ejemplo n.º 16
0
        private void Application_Start()
        {
            MvcHandler.DisableMvcResponseHeader = true;

            AreaRegistration.RegisterAllAreas();

            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);

            var container = BuildContainer();

            DependencyResolver.SetResolver(new AutofacDependencyResolver(container));

            ViewEngines.Engines.Clear();
            ViewEngines.Engines.Add(new FunnelWebViewEngine());

            ControllerBuilder.Current.SetControllerFactory(new FunnelWebControllerFactory(container));

            var federatedAuthenticationConfigurator = container.Resolve <IFederatedAuthenticationConfigurator>();

            federatedAuthenticationConfigurator.InitiateFederatedAuthentication();
        }
Ejemplo n.º 17
0
        public void RegisterBundles_RegistersStyleBundles()
        {
            String[] expectedBundles =
            {
                "~/Content/Bootstrap/Bundle",
                "~/Content/JQueryUI/Bundle",
                "~/Content/FontAwesome/Bundle",
                "~/Content/GridMvc/Bundle",
                "~/Content/JsTree/Bundle",
                "~/Content/Datalist/Bundle",
                "~/Content/Auth/Bundle",
                "~/Content/Shared/Bundle"
            };

            BundleCollection bundles = new BundleCollection();

            BundleConfig.RegisterBundles(bundles);
            Type expected = typeof(StyleBundle);

            foreach (String path in expectedBundles)
            {
                Assert.IsInstanceOf(expected, bundles.GetBundleFor(path));
            }
        }
Ejemplo n.º 18
0
        public void RegisterBundles_RegistersScriptBundles()
        {
            String[] expectedBundles =
            {
                "~/Scripts/JQuery/Bundle",
                "~/Scripts/Bootstrap/Bundle",
                "~/Scripts/JQueryUI/Bundle",
                "~/Scripts/Globalize/Bundle",
                "~/Scripts/GridMvc/Bundle",
                "~/Scripts/JsTree/Bundle",
                "~/Scripts/Datalist/Bundle",
                "~/Scripts/Shared/Bundle"
            };

            BundleCollection bundles = new BundleCollection();

            BundleConfig.RegisterBundles(bundles);
            Type expected = typeof(ScriptBundle);

            foreach (String path in expectedBundles)
            {
                Assert.IsInstanceOf(expected, bundles.GetBundleFor(path));
            }
        }
 void Application_Start(object sender, EventArgs e)
 {
     // Código que se ejecuta al iniciar la aplicación
     RouteConfig.RegisterRoutes(RouteTable.Routes);
     BundleConfig.RegisterBundles(BundleTable.Bundles);
 }
Ejemplo n.º 20
0
 void Application_Start(object sender, EventArgs e)
 {
     // Код, выполняемый при запуске приложения
     RouteConfig.RegisterRoutes(RouteTable.Routes);
     BundleConfig.RegisterBundles(BundleTable.Bundles);
 }
 void Application_Start(object sender, EventArgs e)
 {
     // Code that runs on application startup
     RouteConfig.RegisterRoutes(RouteTable.Routes);
     BundleConfig.RegisterBundles(BundleTable.Bundles);
 }
Ejemplo n.º 22
0
 /// <summary>
 /// When overriden by a deriving class, this constructor initialises the
 /// generic components of a bundle.
 /// </summary>
 public Bundle()
 {
     this.config = new BundleConfig(this.BundleID);
 }
		public void ConstructorTest()
		{
			BundleConfig bc = new BundleConfig();
			Assert.IsNotNull(bc);
		}
Ejemplo n.º 24
0
 protected void Application_Start()
 {
     AreaRegistration.RegisterAllAreas();
     RouteConfig.RegisterRoutes(RouteTable.Routes);
     BundleConfig.RegisterBundles(BundleTable.Bundles);
 }
 public BundleConfigTests()
 {
     config = new BundleConfig();
 }
Ejemplo n.º 26
0
 public void Configuration(IAppBuilder app)
 {
     BundleConfig.RegisterBundles(BundleTable.Bundles);
     RouteConfig.RegisterRoutes(RouteTable.Routes);
 }
Ejemplo n.º 27
0
 void Application_Start(object sender, EventArgs e)
 {
     // 應用程式啟動時執行的程式碼
     RouteConfig.RegisterRoutes(RouteTable.Routes);
     BundleConfig.RegisterBundles(BundleTable.Bundles);
 }