예제 #1
0
        private void GravarXMLs(SitemMapIndex index)
        {
            if (index.Files.Count() == 1)
            {
                _writeFile.WriteFile(index.Files.FirstOrDefault().xml, index.Config.LocalFile + "sitemap.xml");
            }
            else
            {
                foreach (var item in index.Files)
                {
                    _writeFile.WriteFile(item.xml, index.Config.LocalFile + item.fileName);
                }

                _writeFile.WriteFile(index.xml, index.Config.LocalFile + "sitemap_index.xml");
            }
        }
예제 #2
0
 public EasySiteMapGenerator(ISiteMapConfig config, IXMLUrlGenerator generetorUrl)
 {
     _config    = config;
     _siteIndex = new SitemMapIndex(generetorUrl, new XMLIndexGenerator(), config);
     _writeFile = new WriteFileXML();
 }
예제 #3
0
 public EasySiteMapGenerator(ISiteMapConfig config, IXMLUrlGenerator generetorUrl, IXMLIndexGenerator generatorIndex, IWriteFileXML writeFile)
 {
     _config    = config;
     _siteIndex = new SitemMapIndex(generetorUrl, generatorIndex, config);
     _writeFile = writeFile;
 }
예제 #4
0
 public EasySiteMapGenerator(ISiteMapConfig config)
 {
     _config    = config;
     _siteIndex = new SitemMapIndex(new XMLUrlsGenerator(), new XMLIndexGenerator(), config);
     _writeFile = new WriteFileXML();
 }