public void GenerateSitemaps(List <Url> urls, DirectoryInfo targetDirectory, string sitemapBaseFileNameWithoutExtension = "sitemap") { var sitemap = new Sitemap { Urls = urls }; SaveSitemaps(targetDirectory, sitemapBaseFileNameWithoutExtension, sitemap); }
private void SaveSitemaps(DirectoryInfo targetDirectory, string sitemapBaseFileNameWithoutExtension, Sitemap sitemap) { var fileName = $"{sitemapBaseFileNameWithoutExtension}.xml"; _serializedXmlSaver.SerializeAndSave(sitemap, targetDirectory, fileName); }