public IpWatchDogService(ILog log, AppConfig config, IIpPersistor persistor, IIpRetriever retriever, IIpNotifier notifier) { _log = log; _persistor = persistor; _retriever = retriever; _notifier = notifier; _config = config; }
public CommandIpNotifier(ILog log, AppConfig config) { _log = log; _command = config.Command.Trim(); if (String.IsNullOrEmpty(_command)) { throw new ArgumentException("Command cannot be null or empty"); } }
private IIpNotifier CreateNotifier(AppConfig config) { if (string.IsNullOrEmpty(config.Command)) { return new MailIpNotifier(_log, config); } else { return new CommandIpNotifier(_log, config); } }
private IService CreateWatchDogService() { var config = new AppConfig(); return new IpWatchDogService( _log, config, new IpPersistor(_log), new WebIpRetriever(_log), new MailIpNotifier(_log, config)); }
public MailIpNotifier(ILog log, AppConfig config) { _log = log; _config = config; }
public WebIpRetriever(ILog log, AppConfig config) { _log = log; _config = config; }