/// <summary> /// Restarts MonoDevelop /// </summary> /// <returns> false if the user cancels exiting. </returns> /// <param name="reopenWorkspace"> true to reopen current workspace. </param> /// <remarks> /// Starts a new MonoDevelop instance in a new process and /// stops the current MonoDevelop instance. /// </remarks> public static async Task <bool> Restart(bool reopenWorkspace = false) { if (await Exit()) { try { DesktopService.RestartIde(reopenWorkspace); } catch (Exception ex) { LoggingService.LogError("Restarting IDE failed", ex); } // return true here even if DesktopService.RestartIde has failed, // because the Ide has already been closed. return(true); } return(false); }
/// <summary> /// Restarts MonoDevelop /// </summary> /// <returns> false if the user cancels exiting. </returns> /// <param name="reopenWorkspace"> true to reopen current workspace. </param> /// <remarks> /// Starts a new MonoDevelop instance in a new process and /// stops the current MonoDevelop instance. /// </remarks> public static async Task <bool> Restart(bool reopenWorkspace = false) { if (await Exit()) { // Log that we restarted ourselves PropertyService.Set("MonoDevelop.Core.RestartRequested", true); try { DesktopService.RestartIde(reopenWorkspace); } catch (Exception ex) { LoggingService.LogError("Restarting IDE failed", ex); } // return true here even if DesktopService.RestartIde has failed, // because the Ide has already been closed. return(true); } return(false); }