Ejemplo n.º 1
0
        public static MvcHtmlString LatestEntryInfoLink(this Blog blog, HtmlHelper htmlHelper, bool isRegistered)
        {
            if (blog == null)
            {
                throw new ArgumentNullException("blog");
            }

            if (blog.BlogEntries == null || blog.BlogEntries.Count == 0)
            {
                return(new MvcHtmlString("(none)"));
            }

            BlogEntry latest = blog.LatestEntryForUser(isRegistered);

            if (latest == null)
            {
                return(new MvcHtmlString("(none)"));
            }

            return(latest.EntryInfoLink(htmlHelper));
        }