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")); }
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")); }
private string GetKey(string[] files, ScriptType scriptType) { return(CombineClient.GetKey(new ScriptRequest(/*files.Select(VirtualPathUtility.ToAbsolute).ToArray()*/ files, scriptType, Version))); }
public StaticContentResult JS(string key) { return(CombineClient.GetContent(key)); }