public TestablePackageViewModel(
			IPackageViewModelParent parent,
			FakePackage package,
			PackageManagementSelectedProjects selectedProjects,
			FakePackageManagementEvents packageManagementEvents,
			FakePackageActionRunner actionRunner,
			FakeLogger logger)
            : base(parent,
				package,
				selectedProjects,
				packageManagementEvents,
				actionRunner,
				logger)
        {
            this.FakePackage = package;
            this.FakePackageManagementEvents = packageManagementEvents;
            this.FakeActionRunner = actionRunner;
            this.FakeLogger = logger;

            IsProjectPackageReturnsValue = true;
            IsProjectPackageIsCalled = false;

            IsProjectPackageAction = p => {
                IsProjectPackageIsCalled = true;
                return IsProjectPackageReturnsValue;
            };
        }
        void GetTitle(IPackageManagementSolution solution)
        {
            var    selectedProjects = new PackageManagementSelectedProjects(solution);
            string selectionName    = selectedProjects.SelectionName;

            Title = String.Format("{0} - Manage Packages", selectionName);
        }
		public PackageViewModel CreatePackageViewModel(IPackageViewModelParent parent, IPackageFromRepository package)
		{
			SelectedProjects = new PackageManagementSelectedProjects(FakeSolution);
			return new PackageViewModel(
				parent,
				package,
				SelectedProjects,
				FakePackageManagementEvents,
				FakeActionRunner,
				FakeLogger);
		}
        public UpdatedPackagesViewModel(
            IPackageManagementSolution solution,
            IRegisteredPackageRepositories registeredPackageRepositories,
            UpdatedPackageViewModelFactory packageViewModelFactory,
            ITaskFactory taskFactory)
            : base(registeredPackageRepositories,
				packageViewModelFactory,
				taskFactory)
        {
            this.selectedProjects = new PackageManagementSelectedProjects(solution);
            ShowPackageSources = true;
        }
Ejemplo n.º 5
0
 public UpdatedPackagesViewModel(
     IPackageManagementSolution solution,
     IRegisteredPackageRepositories registeredPackageRepositories,
     UpdatedPackageViewModelFactory packageViewModelFactory,
     ITaskFactory taskFactory)
     : base(
         registeredPackageRepositories,
         packageViewModelFactory,
         taskFactory)
 {
     this.selectedProjects = new PackageManagementSelectedProjects(solution);
 }
Ejemplo n.º 6
0
        public PackageViewModel(
            IPackageFromRepository package,
            PackageManagementSelectedProjects selectedProjects,
            IPackageManagementEvents packageManagementEvents,
            IPackageActionRunner actionRunner,
            ILogger logger)
        {
            this.package                 = package;
            this.selectedProjects        = selectedProjects;
            this.packageManagementEvents = packageManagementEvents;
            this.actionRunner            = actionRunner;
            this.logger = CreateLogger(logger);

            CreateCommands();
        }
Ejemplo n.º 7
0
		public TestablePackageViewModel (
			IPackageViewModelParent parent,
			FakePackage package,
			PackageManagementSelectedProjects selectedProjects,
			PackageManagementEvents packageManagementEvents,
			FakeLogger logger)
			: base (
				parent,
				package,
				selectedProjects,
				packageManagementEvents,
				null,
				logger)
		{
			this.FakePackage = package;
			this.PackageManagementEvents = packageManagementEvents;
			this.FakeLogger = logger;
		}
Ejemplo n.º 8
0
		public TestablePackageViewModel(
			FakePackage package,
			PackageManagementSelectedProjects selectedProjects,
			FakePackageManagementEvents packageManagementEvents,
			FakePackageActionRunner actionRunner,
			FakeLogger logger)
			: base(
				package,
				selectedProjects,
				packageManagementEvents,
				actionRunner,
				logger)
		{
			this.FakePackage = package;
			this.FakePackageManagementEvents = packageManagementEvents;
			this.FakeActionRunner = actionRunner;
			this.FakeLogger = logger;
		}
		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;
		}
Ejemplo n.º 10
0
		public UpdatedPackagesViewModel(
			IPackageManagementSolution solution,
			IRegisteredPackageRepositories registeredPackageRepositories,
			UpdatedPackageViewModelFactory packageViewModelFactory,
			ITaskFactory taskFactory)
			: base(
				registeredPackageRepositories,
				packageViewModelFactory,
				taskFactory)
		{
			this.selectedProjects = new PackageManagementSelectedProjects(solution);
			this.logger = packageViewModelFactory.Logger;
			this.packageManagementEvents = packageViewModelFactory.PackageManagementEvents;
			
			packageManagementEvents.ParentPackagesUpdated += PackagesUpdated;
			
			ShowPackageSources = true;
			ShowUpdateAllPackages = true;
			ShowPrerelease = true;
		}
Ejemplo n.º 11
0
        public UpdatedPackagesViewModel(
            IPackageManagementSolution solution,
            IRegisteredPackageRepositories registeredPackageRepositories,
            UpdatedPackageViewModelFactory packageViewModelFactory,
            ITaskFactory taskFactory)
            : base(
                registeredPackageRepositories,
                packageViewModelFactory,
                taskFactory)
        {
            this.selectedProjects        = new PackageManagementSelectedProjects(solution);
            this.logger                  = packageViewModelFactory.Logger;
            this.packageManagementEvents = packageViewModelFactory.PackageManagementEvents;

            packageManagementEvents.ParentPackagesUpdated += PackagesUpdated;

            ShowPackageSources    = true;
            ShowUpdateAllPackages = true;
            ShowPrerelease        = true;
        }
Ejemplo n.º 12
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 FakePackageViewModelFactory()
		{
			SelectedProjects = new PackageManagementSelectedProjects(FakeSolution);
		}
		void CreateSelectedProjects()
		{
			selectedProjects = new PackageManagementSelectedProjects(fakeSolution);
		}
 void GetTitle(IPackageManagementSolution solution)
 {
     var selectedProjects = new PackageManagementSelectedProjects(solution);
     string selectionName = selectedProjects.SelectionName;
     Title = String.Format("{0} - Manage Packages", selectionName);
 }