예제 #1
0
 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));
 }
예제 #5
0
 public InstallPackageDataSource(SearchPopupSearchPattern searchPattern)
 {
     this.searchPattern = searchPattern;
     command            = new InstallPackageCommand(searchPattern.Pattern);
 }
예제 #6
0
 public InstallPackageSearchResult(InstallPackageCommand command)
     : base("", "", 0)
 {
     this.command = command;
 }
		public InstallPackageDataSource (SearchPopupSearchPattern searchPattern)
		{
			this.searchPattern = searchPattern;
			command = new InstallPackageCommand (searchPattern.Pattern);
		}