private const int _interval = 60000*30; //30 mins

        public IpAddressUpdaterService()
        {
            try
            {
                var fetcher = new IpAddressFetcher();
                var currentIp = fetcher.GetCurrentIpAddressDetails().Result;
                _manager = new UpdateManager(currentIp);
                _logger.Info("Ip Address Service Started - Current IP {0}", currentIp.Ip);
            }
            catch (AggregateException exception)
            {
                var message = exception.InnerExceptions.Count > 0 ? exception.InnerException.Message : exception.Message;
                _logger.Error(message);
            }
        }
Esempio n. 2
0
        private const int _interval   = 60000 * 30; //30 mins

        public IpAddressUpdaterService()
        {
            try
            {
                var fetcher   = new IpAddressFetcher();
                var currentIp = fetcher.GetCurrentIpAddressDetails().Result;
                _manager = new UpdateManager(currentIp);
                _logger.Info("Ip Address Service Started - Current IP {0}", currentIp.Ip);
            }
            catch (AggregateException exception)
            {
                var message = exception.InnerExceptions.Count > 0 ? exception.InnerException.Message : exception.Message;
                _logger.Error(message);
            }
        }
 public UpdateManager(IpAddressInfo info)
 {
     AddressInfo = info;
     _ipAddressFetcher = new IpAddressFetcher();
 }
 public UpdateManager(IpAddressInfo info)
 {
     AddressInfo       = info;
     _ipAddressFetcher = new IpAddressFetcher();
 }