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());
        }
示例#2
0
 public string MapPath(string path)
 {
     return(virtualPathUtility.MapPath(path));
 }