SubmitSitemapToSearchenginesByHttp() 공개 메소드

public SubmitSitemapToSearchenginesByHttp ( ) : bool
리턴 bool
예제 #1
0
        public void RefreshSitemap(object sender, EventArgs args)
        {
            var sites = SitemapManagerConfiguration.GetSiteNames();

            foreach (var site in sites)
            {
                var config         = new SitemapManagerConfiguration(site);
                var sitemapManager = new SitemapManager(config);
                sitemapManager.SubmitSitemapToSearchenginesByHttp();

                if (!config.GenerateRobotsFile)
                {
                    continue;
                }
                sitemapManager.RegisterSitemapToRobotsFile();
            }
        }
예제 #2
0
 public void RefreshSitemap(object sender, EventArgs args)
 {
     try
     {
         var sites = SitemapManagerConfiguration.GetSiteNames();
         foreach (var site in sites)
         {
             var config         = new SitemapManagerConfiguration(site);
             var sitemapManager = new SitemapManager(config);
             sitemapManager.SubmitSitemapToSearchenginesByHttp();
             //removed because now the robots is generated when it is invoked the url with robots.txt at the end
             //if (!config.GenerateRobotsFile) continue;
             //sitemapManager.RegisterSitemapToRobotsFile();
         }
     }
     catch (Exception e)
     {
         Log.Error("Error Sitemap", e, this);
     }
 }