private async Task <bool> DoCommandExecute(bool refreshNpmController, NpmCommand command) { Debug.Assert(_executingCommand == null, "Attempting to execute multiple commands at the same time."); try { bool success = await NmpCommandRunner.ExecuteAsync(this, command); if (refreshNpmController) { _npmController.Refresh(); } return(success); } catch (Exception e) { OnOutputLogged(e.ToString()); } return(false); }
private async Task <bool> DoCommandExecute(bool refreshNpmController) { try { RegisterLogEvents(_command); bool success = await _command.ExecuteAsync(); UnregisterLogEvents(_command); if (refreshNpmController) { _npmController.Refresh(); } return(success); } catch (Exception e) { OnOutputLogged(e.ToString()); } return(false); }