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

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

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