public Scraper(ILogger logger, ScraperConfiguration configuration) { m_rUrlRegex = new Regex(m_strUrlAnchorPattern, RegexOptions.IgnoreCase | RegexOptions.Compiled); m_rEmailRegex = new Regex(m_strEmailAnchorPattern, RegexOptions.IgnoreCase | RegexOptions.Compiled); m_iScrapedUrlCount = 0; m_iScrapedEmailCount = 0; m_logger = logger; m_configuration = configuration; }
public static void Main(string[] args) { // Main information and copyright var strStartMsg = "CScrap: Version 1.0\nBy Corey Prophitt <www.marustudios.com>\n"; Console.WriteLine(strStartMsg); ILogger logger = new CLogger(); //ILogger logger = new FLogger( "../../logs/log.txt" ); var scraperConfig = new ScraperConfiguration( "../../config/settings.xml", logger ); var scraper = new Scraper(logger, scraperConfig); scraper.Run(); // Main information and copyright var strEndMsg = "\nThanks for using CScrap!\n"; Console.WriteLine(strEndMsg); }