示例#1
0
        public void GenerateSitemaps(List <Url> urls, DirectoryInfo targetDirectory, string sitemapBaseFileNameWithoutExtension = "sitemap")
        {
            var sitemap = new Sitemap {
                Urls = urls
            };

            SaveSitemaps(targetDirectory, sitemapBaseFileNameWithoutExtension, sitemap);
        }
示例#2
0
        private void SaveSitemaps(DirectoryInfo targetDirectory, string sitemapBaseFileNameWithoutExtension, Sitemap sitemap)
        {
            var fileName = $"{sitemapBaseFileNameWithoutExtension}.xml";

            _serializedXmlSaver.SerializeAndSave(sitemap, targetDirectory, fileName);
        }