예제 #1
0
        public WebLoader()
        {
            this.urlValidator = new UrlValidator();
            CloudStorageAccount storageAccount = CloudStorageAccount.Parse(
                ConfigurationManager.AppSettings["StorageConnectionString"]
                );
            CloudQueueClient queueClient = storageAccount.CreateCloudQueueClient();

            urlQueue = queueClient.GetQueueReference(UrlMessage.QUEUE_URL);
        }
예제 #2
0
        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);
        }