public void StartService() { if (!HostHealthy) { throw new ApplicationException("Did not initialize components."); } try { mEngine.Start(); } catch (Exception ex) { log.FatalException("Could not start service components.", ex); HostHealthy = false; } }
public void RestartService() { if (!HostHealthy) { throw new ApplicationException("Did not initialize components."); } try { log.Info("Stopping service components..."); mEngine.Stop(); mEngine.Dispose(); log.Info("Starting service components..."); mEngine = new ReconciliationEngine(); mEngine.Start(); } catch (Exception ex) { log.FatalException("Could not restart components.", ex); HostHealthy = false; } }