public HtmlString Render(string bundlePath)
        {
            var bundle = BundleCollection.Instance.Find(bundlePath);

            ExpManager.ThrowIfNull(bundle);
            //bundle management : dev -> multipletags, prod -> one bundle
            return(BundleCollection.Instance.IsMinMode ? MinRender(bundle) : FlatRender(bundle));
        }
Пример #2
0
        public virtual Bundle IncludeDirectory(string directoryPath, string pattern)
        {
            directoryPath = directoryPath.Replace("~/", string.Empty);
            directoryPath = Path.Combine(BundleCollection.Instance.RootPath, directoryPath);
            ExpManager.ThrowIfFalse(Directory.Exists(directoryPath));
            var files = Directory.GetFiles(directoryPath, pattern);

            return(Include(files));
        }