private void InitializeCore() { try { var stopwatch = Stopwatch.StartNew(); InitializeHttpApi(); InitializeLogging(); LoadControllerSettings(); InitializeDiscovery(); HomeAutomationTimer timer = InitializeTimer(); TryInitialize(); LoadNonControllerSettings(); _httpServer.Start(80); ExposeToApi(); stopwatch.Stop(); Logger.Info("Startup completed after " + stopwatch.Elapsed); timer.Run(); } catch (Exception exception) { Debug.WriteLine(exception.ToString()); } }
private HomeAutomationTimer InitializeTimer() { var timer = new HomeAutomationTimer(Logger); Timer = timer; return(timer); }
private HomeAutomationTimer InitializeTimer() { var timer = new HomeAutomationTimer(); Timer = timer; ServiceLocator.RegisterService(typeof(ISchedulerService), new SchedulerService(Timer)); return(timer); }