C# 클래스 Decision.Common.Sitemap.SitemapGenerator

Generates sitemap XML.
파일 보기 프로젝트 열기: rabbal/Decision

보호된 메소드들

메소드 설명
GetSitemapDocuments ( IReadOnlyCollection sitemapNodes ) : List

Gets the collection of XML sitemap documents for the current site. If there are less than 25,000 sitemap nodes, only one sitemap document will exist in the collection, otherwise a sitemap index document will be the first entry in the collection and all other entries will be sitemap XML documents.

GetSitemapUrl ( int index ) : string

Gets the URL to the sitemap with the specified index.

LogWarning ( Exception exception ) : void

Logs warnings when a sitemap exceeds the maximum size of 10MB or if the sitemap index file exceeds the maximum number of allowed sitemaps. No exceptions are thrown in this case as the sitemap file is still generated correctly and search engines may still read it.

비공개 메소드들

메소드 설명
CheckDocumentSize ( string sitemapXml ) : void

Checks the size of the XML sitemap document. If it is over 10MB, logs an error.

CheckSitemapCount ( int sitemapCount ) : void

Checks the count of the number of sitemaps. If it is over 50,000, logs an error.

GetSitemapDocument ( IEnumerable sitemapNodes ) : string

Gets the sitemap XML document for the specified set of nodes.

GetSitemapIndexDocument ( IEnumerable sitemaps ) : string

Gets the sitemap index XML document, containing links to all the sitemap XML documents.

메소드 상세

GetSitemapDocuments() 보호된 메소드

Gets the collection of XML sitemap documents for the current site. If there are less than 25,000 sitemap nodes, only one sitemap document will exist in the collection, otherwise a sitemap index document will be the first entry in the collection and all other entries will be sitemap XML documents.
protected GetSitemapDocuments ( IReadOnlyCollection sitemapNodes ) : List
sitemapNodes IReadOnlyCollection The sitemap nodes for the current site.
리턴 List

GetSitemapUrl() 보호된 추상적인 메소드

Gets the URL to the sitemap with the specified index.
protected abstract GetSitemapUrl ( int index ) : string
index int The index.
리턴 string

LogWarning() 보호된 메소드

Logs warnings when a sitemap exceeds the maximum size of 10MB or if the sitemap index file exceeds the maximum number of allowed sitemaps. No exceptions are thrown in this case as the sitemap file is still generated correctly and search engines may still read it.
protected LogWarning ( Exception exception ) : void
exception System.Exception The exception to log.
리턴 void