/// <summary> /// Cleans up after closing a solution /// </summary> private void OnSolutionClosed() { // --- When the current solution has been closed, // --- stop the virtual machine and clean up SolutionClosed?.Invoke(this, EventArgs.Empty); DebugInfoProvider.Clear(); MachineViewModel?.StopVm(); }
/// <summary> /// Cleans up after closing a solution /// </summary> private void OnSolutionClosed() { try { // --- When the current solution has been closed, // --- stop the virtual machine and clean up SolutionClosed?.Invoke(this, EventArgs.Empty); ErrorList.Clear(); DebugInfoProvider.Clear(); MachineViewModel?.Stop(); CodeDiscoverySolution = null; } catch (Exception e) { if (!(GetService(typeof(SVsActivityLog)) is IVsActivityLog log)) return; log.LogEntry((uint)__ACTIVITYLOG_ENTRYTYPE.ALE_ERROR, "OnSolutionClosed", $"Exception raised: {e}"); } }