public BoilerMonitor(IBoilerRepository repo, ITimerAdapter timer, IBoilerStatusRepository logger) { _repo = repo; _logger = logger; lastOff = DateTime.Now.AddHours(-1); IBoiler b = logger.Retrieve().ToBoiler(); _repo.Save(b); timer.Initialize(MonitorState); }
public BoilerMonitor(IBoilerRepository repo, ITimerAdapter timer, IBoilerStatusRepository logger) { _repo = repo; _logger = logger; lastOff = DateTime.Now.AddHours(-1); IBoiler b = logger.Retrieve().ToBoiler(); _repo.Save(b); timer.Initialize(MonitorState); }