Пример #1
0
 private void AppendChildren(IEnumerable <Webpage> allWebpages, XElement urlset, XDocument xmlDocument)
 {
     foreach (Webpage webpage in allWebpages.Where(webpage => _sitemapElementAppender.ShouldAppend(webpage)))
     {
         _sitemapElementAppender.AddCustomSiteMapData(webpage, urlset, xmlDocument);
     }
 }
Пример #2
0
        public static bool IsExcludedFromSitemap(this HtmlHelper <Webpage> helper)
        {
            ISitemapElementAppender appender = helper.ViewContext.HttpContext.Get <ISitemapElementAppender>();

            return(!appender.ShouldAppend(helper.ViewData.Model));
        }