/// <inheritDoc/> public ActionResult CreateSitemapIndex(SitemapIndexModel sitemapIndexModel) { if (sitemapIndexModel == null) { throw new ArgumentNullException(nameof(sitemapIndexModel)); } return(new XmlResult <SitemapIndexModel>(sitemapIndexModel, baseUrlProvider)); }
/// <inheritDoc/> public ActionResult CreateSitemapIndex(SitemapIndexModel sitemapIndexModel) { if (sitemapIndexModel == null) { throw new ArgumentNullException(nameof(sitemapIndexModel)); } return new XmlResult<SitemapIndexModel>(sitemapIndexModel, baseUrlProvider); }
/// <summary> /// Creates a sitemap. /// </summary> /// <param name="httpContext">ASP.NET HTTP context.</param> /// <param name="nodes">Nodes for linking sitemap files</param> public ActionResult CreateSitemap(HttpContextBase httpContext, IEnumerable <SitemapIndexNode> nodes) { if (httpContext == null) { throw new ArgumentNullException(nameof(httpContext)); } List <SitemapIndexNode> nodeList = nodes?.ToList() ?? new List <SitemapIndexNode>(); SitemapIndexModel sitemap = new SitemapIndexModel(nodeList); return(_sitemapActionResultFactory.CreateSitemapResult(httpContext, sitemap)); }