public void Crawl() { _queueManager.Add(new PageToCrawl(new Uri("http://www.nairaland.com/programming", UriKind.Absolute)) { IsBaseUrl = true, ParentUrl = new Uri("http://www.nairaland.com/programming", UriKind.Absolute), SiteName = SiteNames.NAIRALAND }); _queueManager.Add(new PageToCrawl(new Uri("http://stackoverflow.com/questions", UriKind.Absolute)) { IsBaseUrl = true, ParentUrl = new Uri("http://stackoverflow.com/questions", UriKind.Absolute), SiteName = SiteNames.STACKOVERFLOW }); try { StartMultiThreadedCrawling(); } catch (Exception e) { //ignored //log the error } finally { if (_threadCordinator != null) { _threadCordinator.Dispose(); } } }
public void ProcessCommand(string roverName, string commands) { _queueManager.Add(new QueueMessage { RoverName = roverName, Commands = commands }); }