Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            ILogger          logger          = new Logger();
            IBrowserService  browserService  = new BrowserPoolService();
            IConvertService  convertService  = new ConvertService();
            IDocumentService documentService = new DocumentService();
            IXmlReadService  xmlReadService  = new XmlReadService();

            IProductsPageParseService productsPageParseService = new ProductsPageParseService(logger, browserService, convertService);

            IRegionChangeService regionChangeService = new RegionChangeService(browserService);

            regionChangeService.ChangeRegion(ConfigurationManager.AppSettings["regionname"]);

            convertService.GetUniqCategoriesFromSiteMap(convertService.WriteSiteMapFromXml(xmlReadService.DownloadXml())).ToList().ForEach(c =>
            {
                documentService.WriteProductsInExcel(logger, productsPageParseService.GetProducts(c.loc), convertService.GetSafeFilename(c.loc));
            });
        }