public void Run(InstallPackageCommand command) { try { var project = IdeApp.ProjectOperations.CurrentSelectedProject; var packageReference = new PackageManagementPackageReference(command.PackageId, command.GetVersionString()); PackageManagementServices.ProjectOperations.InstallPackages(project, new [] { packageReference }); } catch (Exception ex) { ShowStatusBarError(ex); } }
public void Run (InstallPackageCommand command) { try { IPackageManagementProject project = PackageManagementServices.Solution.GetActiveProject (); var action = new InstallPackageAction (project, PackageManagementServices.PackageManagementEvents); action.PackageId = command.PackageId; action.PackageVersion = command.GetVersion (); ProgressMonitorStatusMessage progressMessage = CreateProgressMessage (action.PackageId); PackageManagementServices.BackgroundPackageActionRunner.Run (progressMessage, action); } catch (Exception ex) { ShowStatusBarError (ex); } }
public void Run(InstallPackageCommand command) { try { IPackageManagementProject project = PackageManagementServices.Solution.GetActiveProject(); var action = new InstallPackageAction(project, PackageManagementServices.PackageManagementEvents); action.PackageId = command.PackageId; action.PackageVersion = command.GetVersion(); ProgressMonitorStatusMessage progressMessage = CreateProgressMessage(action.PackageId); PackageManagementServices.BackgroundPackageActionRunner.Run(progressMessage, action); } catch (Exception ex) { ShowStatusBarError(ex); } }
public override Task GetResults( ISearchResultCallback searchResultCallback, SearchPopupSearchPattern pattern, CancellationToken token) { if (pattern.Tag == null || IsValidTag(pattern.Tag)) { var command = new InstallPackageCommand(pattern.Pattern); var result = new InstallPackageSearchResult(command); if (result.CanBeDisplayed()) { searchResultCallback.ReportResult(result); } } return(Task.FromResult(0)); }
public InstallPackageDataSource(SearchPopupSearchPattern searchPattern) { this.searchPattern = searchPattern; command = new InstallPackageCommand(searchPattern.Pattern); }
public InstallPackageSearchResult(InstallPackageCommand command) : base("", "", 0) { this.command = command; }
public InstallPackageDataSource (SearchPopupSearchPattern searchPattern) { this.searchPattern = searchPattern; command = new InstallPackageCommand (searchPattern.Pattern); }