AjaxControlToolkit.StaticResources.PreApplicationStartCode.CreateScriptBundle C# (CSharp) Method

CreateScriptBundle() static private method

static private CreateScriptBundle ( string bundleName ) : void
bundleName string
return void
        static void CreateScriptBundle(string bundleName)
        {
            if(String.IsNullOrWhiteSpace(bundleName)) {
                var bundle = new ScriptBundle("~/Scripts/AjaxControlToolkit/Bundle", Constants.CdnPrefix + "Scripts/AjaxControlToolkit/Bundle.js")
                    .Include(ToolkitResourceManager.GetScriptPaths());
                AddCdnFallbackExpression(bundle);
                BundleTable.Bundles.Add(bundle);
            } else {
                var bundle = new ScriptBundle("~/Scripts/AjaxControlToolkit/" + bundleName + "Bundle")
                    .Include(ToolkitResourceManager.GetScriptPaths(bundleName));
                AddCdnFallbackExpression(bundle);
                BundleTable.Bundles.Add(bundle);
            }
        }