Пример #1
0
        public static string ImgFor(this HtmlHelper htmlHelper, string tag, string alt, object htmlAttributes)
        {
            var file = AssetCache.GetFileFor(tag).FirstOrDefault();

            if (string.IsNullOrEmpty(file))
            {
                return(null);
            }
            return(StaticResourceExtensions.Img(htmlHelper, file, alt, htmlAttributes));
        }
Пример #2
0
        public static string StylesheetsFor(this HtmlHelper htmlHelper, params string[] tags)
        {
            var files = AssetCache.GetCssFor(tags);
            var sb    = new StringBuilder();

            foreach (var file in files)
            {
                sb.AppendLine(StaticResourceExtensions.Stylesheet(htmlHelper, file));
            }
            return(sb.ToString());
        }
Пример #3
0
 public static string Img(this HtmlHelper htmlHelper, string file, string alt)
 {
     return(StaticResourceExtensions.Img(htmlHelper, file, null, null));
 }
Пример #4
0
 public static string Stylesheet(this HtmlHelper htmlHelper, string file)
 {
     return(StaticResourceExtensions.Stylesheet(htmlHelper, file, null));
 }