public WebLoader() { this.urlValidator = new UrlValidator(); CloudStorageAccount storageAccount = CloudStorageAccount.Parse( ConfigurationManager.AppSettings["StorageConnectionString"] ); CloudQueueClient queueClient = storageAccount.CreateCloudQueueClient(); urlQueue = queueClient.GetQueueReference(UrlMessage.QUEUE_URL); }
public WebCrawler(StatsManager statsManager) { web = new HtmlWeb(); CloudStorageAccount storageAccount = CloudStorageAccount.Parse( ConfigurationManager.AppSettings["StorageConnectionString"] ); CloudTableClient tableClient = storageAccount.CreateCloudTableClient(); urlTable = tableClient.GetTableReference(IndexEntity.TABLE_INDEX); visitedUrls = new Dictionary <string, bool>(); urlValidator = new UrlValidator(); CloudQueueClient queueClient = storageAccount.CreateCloudQueueClient(); urlQueue = queueClient.GetQueueReference(UrlMessage.QUEUE_URL); }