Exemplo n.º 1
0
        static void Main(string[] args) {
            var scriptBundle = new ScriptBundle("~/ScriptsBundle").Include(ToolkitResourceManager.GetScriptPaths());
            var styleBundle = new StyleBundle("~/StylesBundle").Include(ToolkitResourceManager.GetStylePaths());

            BundleTable.VirtualPathProvider = new VirtualPathProviderImpl();
            BundleTable.Bundles.Add(scriptBundle);
            BundleTable.Bundles.Add(styleBundle);

            var context = new BundleContext(CreateHttpContext(), BundleTable.Bundles, String.Empty);

            File.WriteAllText("../AjaxControlToolkit.StaticResources/Scripts/Bundle.js", scriptBundle.GenerateBundleResponse(context).Content);
            File.WriteAllText("../AjaxControlToolkit.StaticResources/Styles/Bundle.css", styleBundle.GenerateBundleResponse(context).Content);
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            var scriptBundle = new ScriptBundle("~/ScriptsBundle").Include(ToolkitResourceManager.GetScriptPaths());
            var styleBundle  = new StyleBundle("~/StylesBundle").Include(ToolkitResourceManager.GetStylePaths());

            BundleTable.VirtualPathProvider = new VirtualPathProviderImpl();
            BundleTable.Bundles.Add(scriptBundle);
            BundleTable.Bundles.Add(styleBundle);

            var context = new BundleContext(CreateHttpContext(), BundleTable.Bundles, String.Empty);

            File.WriteAllText("../AjaxControlToolkit.StaticResources/Scripts/Bundle.js", scriptBundle.GenerateBundleResponse(context).Content);
            File.WriteAllText("../AjaxControlToolkit.StaticResources/Styles/Bundle.css", styleBundle.GenerateBundleResponse(context).Content);
        }