示例#1
0
 public void AddOrManagePackage()
 {
     if (!selectedProjects.HasSingleProjectSelected())
     {
         if (IsProjectPackage(package))
         {
             ManagePackage();
         }
         else
         {
             AddPackage();
         }
     }
     else
     {
         AddPackage();
     }
 }
		public IUpdatePackagesAction CreateAction(
			PackageManagementSelectedProjects selectedProjects,
			IEnumerable<IPackageFromRepository> packages)
		{
			this.selectedProjects = selectedProjects;
			this.packages = packages;
			
			singleProjectSelected = selectedProjects.HasSingleProjectSelected();
			
			CreateProjectForDetermingPackageOperations();
			IUpdatePackagesAction action = CreateActionInternal();
			action.AddPackages(packages);
			action.Logger = logger;
			
			IEnumerable<PackageOperation> operations = GetPackageOperations(action);
			action.AddOperations(operations);
			
			return action;
		}
示例#3
0
        public IUpdatePackagesAction CreateAction(
            PackageManagementSelectedProjects selectedProjects,
            IEnumerable <IPackageFromRepository> packages)
        {
            this.selectedProjects = selectedProjects;
            this.packages         = packages;

            singleProjectSelected = selectedProjects.HasSingleProjectSelected();

            CreateProjectForDetermingPackageOperations();
            IUpdatePackagesAction action = CreateActionInternal();

            action.AddPackages(packages);
            action.Logger = logger;

            IEnumerable <PackageOperation> operations = GetPackageOperations(action);

            action.AddOperations(operations);

            return(action);
        }
 public void AddOrManagePackage()
 {
     try {
         if (!selectedProjects.HasSingleProjectSelected())
         {
             if (IsProjectPackage(package))
             {
                 ManagePackage();
             }
             else
             {
                 AddPackage();
             }
         }
         else
         {
             AddPackage();
         }
     } catch (Exception ex) {
         ReportError(ex);
         logger.LogError(ex);
     }
 }