コード例 #1
0
ファイル: IpWatchDogService.cs プロジェクト: vjohnson01/Tools
 public IpWatchDogService(ILog log, AppConfig config, IIpPersistor persistor, IIpRetriever retriever, IIpNotifier notifier)
 {
     _log = log;
     _persistor = persistor;
     _retriever = retriever;
     _notifier = notifier;
     _config = config;
 }
コード例 #2
0
ファイル: CommandIpNotifier.cs プロジェクト: ikriv/IpWatchDog
 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");
     }
 }
コード例 #3
0
ファイル: Configurator.cs プロジェクト: ikriv/IpWatchDog
 private IIpNotifier CreateNotifier(AppConfig config)
 {
     if (string.IsNullOrEmpty(config.Command))
     {
         return new MailIpNotifier(_log, config);
     }
     else
     {
         return new CommandIpNotifier(_log, config);
     }
 }
コード例 #4
0
ファイル: Configurator.cs プロジェクト: vjohnson01/Tools
        private IService CreateWatchDogService()
        {
            var config = new AppConfig();

            return new IpWatchDogService(
                _log, 
                config,
                new IpPersistor(_log), 
                new WebIpRetriever(_log), 
                new MailIpNotifier(_log, config));
        }
コード例 #5
0
ファイル: MailIpNotifier.cs プロジェクト: vjohnson01/Tools
 public MailIpNotifier(ILog log, AppConfig config)
 {
     _log = log;
     _config = config;
 }
コード例 #6
0
 public WebIpRetriever(ILog log, AppConfig config)
 {
     _log    = log;
     _config = config;
 }