protected override void OnSessionChange(SessionChangeDescription changeDescription) { try { _log.Info("[Topshelf] Service session changed"); var arguments = new WindowsSessionChangedArguments(changeDescription); _serviceHandle.SessionChanged(this, arguments); _log.Info("[Topshelf] Stopped"); } catch (Exception ex) { _log.Fatal("The service did not shut down gracefully", ex); ExitCode = (int)TopshelfExitCode.StopServiceFailed; throw; } }
protected override void OnSessionChange(SessionChangeDescription changeDescription) { try { _log.Info("[Topshelf] Service session changed"); var arguments = new WindowsSessionChangedArguments(changeDescription); _serviceHandle.SessionChanged(this, arguments); _log.Info("[Topshelf] Service session changed handled"); } catch (Exception ex) { _settings.ExceptionCallback?.Invoke(ex); _log.Fatal("The did not handle Service session change correctly", ex); ExitCode = (int)TopshelfExitCode.StopServiceFailed; throw; } }
protected override void OnSessionChange(SessionChangeDescription changeDescription) { try { _log.Info("[Topshelf] Service session changed"); var arguments = new WindowsSessionChangedArguments(changeDescription); _serviceHandle.SessionChanged(this, arguments); _log.Info("[Topshelf] Stopped"); } catch (Exception ex) { _log.Fatal("The service did not shut down gracefully", ex); ExitCode = (int)TopshelfExitCode.StopServiceFailed; throw; } }
protected override void OnSessionChange(SessionChangeDescription changeDescription) { try { _log.Info("[Topshelf] Service session changed"); var arguments = new WindowsSessionChangedArguments(changeDescription); _serviceHandle.SessionChanged(this, arguments); _log.Info("[Topshelf] Service session changed handled"); } catch (Exception ex) { _settings.ExceptionCallback?.Invoke(ex); _log.Fatal("The did not handle Service session change correctly", ex); ExitCode = (int)TopshelfExitCode.StopServiceFailed; throw; } }