Inheritance: IHasStyleSheets
コード例 #1
0
        /// <inheritDoc/>
        public ActionResult CreateSitemapIndex(SitemapIndexModel sitemapIndexModel)
        {
            if (sitemapIndexModel == null)
            {
                throw new ArgumentNullException(nameof(sitemapIndexModel));
            }

            return(new XmlResult <SitemapIndexModel>(sitemapIndexModel, baseUrlProvider));
        }
コード例 #2
0
        /// <inheritDoc/>
        public ActionResult CreateSitemapIndex(SitemapIndexModel sitemapIndexModel)
        {
            if (sitemapIndexModel == null)
            {
                throw new ArgumentNullException(nameof(sitemapIndexModel));
            }

            return new XmlResult<SitemapIndexModel>(sitemapIndexModel, baseUrlProvider);
        }
コード例 #3
0
        /// <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));
        }