public void Dispose() { _log.Info("Shutdown requested"); if (_dispatcher != null) { _log.Debug("Performing dispatcher shutdown"); _dispatcher.BeginInvokeShutdown(DispatcherPriority.Normal); } else { _log.Debug("No dispatcher, exiting the process"); _log.Dispose(); Environment.Exit(1); } }