protected override void OnPause() { try { _log.Info("[Topshelf] Pausing service"); _serviceHandle.Pause(this); } catch (Exception ex) { _log.Fatal("The service did not shut down gracefully", ex); throw; } finally { _log.Info("[Topshelf] Paused"); } }
protected override void OnPause() { try { _log.Info("[Topshelf] Pausing service"); if (!_serviceHandle.Pause(this)) { throw new TopshelfException("The service did not pause successfully (returned false)."); } _log.Info("[Topshelf] Paused"); } catch (Exception ex) { _log.Fatal("The service did not pause gracefully", ex); throw; } }
public bool Pause(HostControl hostControl) { return(_serviceHandle.Pause(hostControl)); }
bool ServiceHandle.Pause(HostControl hostControl) { return(_service.Pause(_hostControl)); }
bool ServiceHandle.Pause(HostControl hostControl) { var control = new AppDomainHostControl(this); return(_service.Pause(control)); }