Exemple #1
0
        internal static StaticContentResult Combine(string[] virtualFiles)
        {
            string combineComment = "/* {0} */".FormatWith(virtualFiles.ToString(",")) + "\r\n";

            StringBuilder sb = new StringBuilder();

            foreach (var vf in virtualFiles)
            {
                sb.AppendLine(CombineClient.ReadStaticFile(vf));
            }

            return(new StaticContentResult(Encoding.UTF8.GetBytes(combineComment + Minify(sb.ToString())), "bla.js"));
        }
Exemple #2
0
        internal static StaticContentResult Combine(string[] virtualFiles)
        {
            StringBuilder sb = new StringBuilder();

            foreach (var vf in virtualFiles)
            {
                var content = CombineClient.ReadStaticFile(vf);
                content = ReplaceRelativeImg(content, VirtualPathUtility.ToAbsolute(vf));
                sb.AppendLine("/* {0} */".FormatWith(vf));
                content = Minify(content);
                sb.AppendLine(content);
            }

            return(new StaticContentResult(Encoding.UTF8.GetBytes(sb.ToString()), "bla.css"));
        }