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);
            }
        }
예제 #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);
            }
        }
예제 #3
0
 public UpdateManager(IpAddressInfo info)
 {
     AddressInfo = info;
     _ipAddressFetcher = new IpAddressFetcher();
 }
예제 #4
0
 public UpdateManager(IpAddressInfo info)
 {
     AddressInfo       = info;
     _ipAddressFetcher = new IpAddressFetcher();
 }