private void HandleActiveSolutionChanged(object sender, ActiveSolutionChangedEventArgs e) { try { // Stop the daemon running when a solution is closed if (!e.IsSolutionOpen) { this.daemon.Stop(); } } catch (Exception ex) when(!ErrorHandler.IsCriticalException(ex)) { logger?.WriteLine(Strings.ERROR_StoppingDaemon, ex); } }
private async void ActiveSolutionTracker_ActiveSolutionChanged(object sender, ActiveSolutionChangedEventArgs e) { if (!e.IsSolutionOpen) { // We only need to shut down the server after a solution is closed. // See https://github.com/SonarSource/sonarlint-visualstudio/issues/2438 for more info. await StopServer(); } }
private void ActiveSolutionTracker_ActiveSolutionChanged(object sender, ActiveSolutionChangedEventArgs e) { StopServer(); }