private IEnumerable <string> FindSylesheets() { const string stylePath = "~/assets/"; var cssDir = virtualPathUtility.MapPath(stylePath); if (!Directory.Exists(cssDir)) { return(new string[0]); } var vendorCss = Directory.GetFiles(cssDir, "vendor*.css").FirstOrDefault(); var appCss = Directory.GetFiles(cssDir, "klondike*.css").FirstOrDefault(); return(new[] { vendorCss, appCss } .Where(i => i != null) .Select(i => virtualPathUtility.ToAbsolute(stylePath + Path.GetFileName(i))) .ToList()); }
public string MapPath(string path) { return(virtualPathUtility.MapPath(path)); }