private static void OnServiceShutdown() { _logger.Info("Shutting down"); _appHost.Dispose(); if (!_isRunningAsService) { SetErrorMode(ErrorModes.SYSTEM_DEFAULT); } }
public static void Restart() { _logger.Info("Disposing app host"); _appHost.Dispose(); if (!_isRunningAsService) { _logger.Info("Hiding server notify icon"); _serverNotifyIcon.Visible = false; _logger.Info("Executing windows forms restart"); //Application.Restart(); Process.Start(_appHost.ServerConfigurationManager.ApplicationPaths.ApplicationPath); _logger.Info("Calling Application.Exit"); Environment.Exit(0); } }
private static void DisposeAppHost() { if (!_appHostDisposed) { _logger.Info("Disposing app host"); _appHostDisposed = true; _appHost.Dispose(); } }
private static void OnServiceShutdown() { _logger.Info("Shutting down"); _appHost.Dispose(); }