public FetchAndPublish(AppSettings conf, HttpClient hc) { this.hc = hc; this.conf = conf; this.fetcher = new Fetch(conf, hc); this.publisher = new Publish(conf); schedule = new ScheduleRunner(conf); }
public FetchAndPublish(AppSettings conf) { HttpClientHandler httpClientHandler = new HttpClientHandler() { Proxy = WebRequest.GetSystemWebProxy() }; hc = new HttpClient(httpClientHandler); this.conf = conf; this.fetcher = new Fetch(conf, hc); this.publisher = new Publish(conf); log = new Logging(conf, hc); schedule = new ScheduleRunner(conf); fetcher.addLogListener(new LogDelegate(log.WriteLine)); }