当前位置: 首页>>代码示例>>C#>>正文


C# BundleCollection.RegisterScriptBundle方法代码示例

本文整理汇总了C#中BundleCollection.RegisterScriptBundle方法的典型用法代码示例。如果您正苦于以下问题:C# BundleCollection.RegisterScriptBundle方法的具体用法?C# BundleCollection.RegisterScriptBundle怎么用?C# BundleCollection.RegisterScriptBundle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BundleCollection的用法示例。


在下文中一共展示了BundleCollection.RegisterScriptBundle方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Configure

        public static void Configure(BundleCollection builder)
        {
#if DEBUG
            BundleFactory.RuntimeMode = TFAspNetEnums.RuntimeMode.Debug;
#else
            BundleFactory.RuntimeMode = TFAspNetEnums.RuntimeMode.Release;
#endif
            BundleFactory.ScriptRootPath = "~/static/js/";
            BundleFactory.StyleRootPath = "~/static/css/";

            builder.RegisterScriptBundle(BundleFactory.CreateScriptBundle(TFAspNetConstants.ScriptBundle.ANGULARJS, string.Empty));
            builder.RegisterScriptBundle(BundleFactory.CreateScriptBundle(TFAspNetConstants.ScriptBundle.ASPNETMVC, string.Empty));
            builder.RegisterScriptBundle(BundleFactory.CreateScriptBundle(TFAspNetConstants.ScriptBundle.BOOTSTRAP, string.Empty));
            builder.RegisterScriptBundle(BundleFactory.CreateScriptBundle(TFAspNetConstants.ScriptBundle.BOOTSTRAP_DATETIMEPICKER, string.Empty));
            builder.RegisterScriptBundle(BundleFactory.CreateScriptBundle(TFAspNetConstants.ScriptBundle.DDLEVELSMENU, string.Empty));
            builder.RegisterScriptBundle(BundleFactory.CreateScriptBundle(TFAspNetConstants.ScriptBundle.JQUERY, string.Empty, "jquery.tfpatch.js"));
            builder.RegisterScriptBundle(BundleFactory.CreateScriptBundle(TFAspNetConstants.ScriptBundle.JQUERY_FILER, string.Empty));
            builder.RegisterScriptBundle(BundleFactory.CreateScriptBundle(TFAspNetConstants.ScriptBundle.JQUERY_UI, string.Empty));
            builder.RegisterScriptBundle(BundleFactory.CreateScriptBundle(TFAspNetConstants.ScriptBundle.JQUERY_VALIDATE, string.Empty));
            builder.RegisterScriptBundle(BundleFactory.CreateScriptBundle(TFAspNetConstants.ScriptBundle.MODERNIZR, string.Empty));
            builder.RegisterScriptBundle(BundleFactory.CreateScriptBundle(TFAspNetConstants.ScriptBundle.MOMENT, string.Empty));
            builder.RegisterScriptBundle(BundleFactory.CreateScriptBundle(TFAspNetConstants.ScriptBundle.RESPOND, string.Empty));
            builder.RegisterScriptBundle(BundleFactory.CreateScriptBundle(Constants.ScriptBundle.APP_BOOTSTRAP, string.Empty));
            builder.RegisterScriptBundle(BundleFactory.CreateScriptBundle(Constants.ScriptBundle.APP_FOUNDATION, string.Empty));
            builder.RegisterScriptBundle(BundleFactory.CreateScriptBundle(Constants.ScriptBundle.APP_JQUERY_UI, string.Empty));

            builder.RegisterStyleBundle(BundleFactory.CreateStyleBundle(TFAspNetConstants.StyleBundle.BOOTSTRAP, string.Empty, "bootstrap.tfpatch.css"));
            builder.RegisterStyleBundle(BundleFactory.CreateStyleBundle(TFAspNetConstants.StyleBundle.BOOTSTRAP_DATETIMEPICKER, string.Empty));
            builder.RegisterStyleBundle(BundleFactory.CreateStyleBundle(TFAspNetConstants.StyleBundle.DDLEVELSMENU, string.Empty, "ddlevelsmenu.tfpatch.css"));
            builder.RegisterStyleBundle(BundleFactory.CreateStyleBundle(TFAspNetConstants.StyleBundle.JQUERY_FILER, string.Empty));
            builder.RegisterStyleBundle(BundleFactory.CreateStyleBundle(TFAspNetConstants.StyleBundle.JQUERY_UI, string.Empty));
            builder.RegisterStyleBundle(BundleFactory.CreateStyleBundle(TFAspNetConstants.StyleBundle.JQUERY_VALIDATE, string.Empty));
            builder.RegisterStyleBundle(BundleFactory.CreateStyleBundle(Constants.StyleBundle.APP_BOOTSTRAP, string.Empty, "tforce-*"));
            builder.RegisterStyleBundle(BundleFactory.CreateStyleBundle(Constants.StyleBundle.APP_FOUNDATION, string.Empty, "tforce-*"));
            builder.RegisterStyleBundle(BundleFactory.CreateStyleBundle(Constants.StyleBundle.APP_JQUERY_UI, string.Empty, "tforce-*"));
        }
开发者ID:haltt051093,项目名称:IMS-datacenter,代码行数:36,代码来源:BundleConfig.cs


注:本文中的BundleCollection.RegisterScriptBundle方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。