Example #1
0
 public void ReadPackages()
 {
     AvailablePackagesViewModel.ReadPackages();
     InstalledPackagesViewModel.ReadPackages();
     UpdatedPackagesViewModel.ReadPackages();
     RecentPackagesViewModel.ReadPackages();
 }
Example #2
0
 public void Dispose()
 {
     AvailablePackagesViewModel.Dispose();
     InstalledPackagesViewModel.Dispose();
     RecentPackagesViewModel.Dispose();
     UpdatedPackagesViewModel.Dispose();
 }
		void CreateViewModel()
		{
			registeredPackageRepositories = new FakeRegisteredPackageRepositories();
			taskFactory = new FakeTaskFactory();
			var packageViewModelFactory = new FakePackageViewModelFactory();
			packageManagementEvents = new PackageManagementEvents();
			viewModel = new RecentPackagesViewModel(
				packageManagementEvents,
				registeredPackageRepositories,
				packageViewModelFactory,
				taskFactory);
		}
		void CreateViewModel(FakeRegisteredPackageRepositories registeredPackageRepositories)
		{
			this.registeredPackageRepositories = registeredPackageRepositories;
			taskFactory = new FakeTaskFactory();
			var packageViewModelFactory = new FakePackageViewModelFactory();
			packageManagementEvents = new PackageManagementEvents();
			viewModel = new RecentPackagesViewModel(
				new FakePackageManagementSolution(),
				packageManagementEvents,
				registeredPackageRepositories,
				packageViewModelFactory,
				taskFactory);
		}
        public PackagesViewModels(
            IPackageManagementSolution solution,
            IRegisteredPackageRepositories registeredPackageRepositories,
            IThreadSafePackageManagementEvents packageManagementEvents,
            IPackageActionRunner actionRunner,
            ITaskFactory taskFactory)
        {
            var packageViewModelFactory        = new PackageViewModelFactory(solution, packageManagementEvents, actionRunner);
            var updatedPackageViewModelFactory = new UpdatedPackageViewModelFactory(packageViewModelFactory);

            AvailablePackagesViewModel = new AvailablePackagesViewModel(solution, packageManagementEvents, registeredPackageRepositories, packageViewModelFactory, taskFactory);
            InstalledPackagesViewModel = new InstalledPackagesViewModel(solution, packageManagementEvents, registeredPackageRepositories, packageViewModelFactory, taskFactory);
            UpdatedPackagesViewModel   = new UpdatedPackagesViewModel(solution, packageManagementEvents, registeredPackageRepositories, updatedPackageViewModelFactory, taskFactory);
            RecentPackagesViewModel    = new RecentPackagesViewModel(solution, packageManagementEvents, registeredPackageRepositories, packageViewModelFactory, taskFactory);
        }
        public PackagesViewModels(
			IPackageManagementSolution solution,
			IRegisteredPackageRepositories registeredPackageRepositories,
			IThreadSafePackageManagementEvents packageManagementEvents,
			IPackageActionRunner actionRunner,
			ITaskFactory taskFactory)
        {
            var packageViewModelFactory = new PackageViewModelFactory(solution, packageManagementEvents, actionRunner);
            var updatedPackageViewModelFactory = new UpdatedPackageViewModelFactory(packageViewModelFactory);

            AvailablePackagesViewModel = new AvailablePackagesViewModel(solution, packageManagementEvents, registeredPackageRepositories, packageViewModelFactory, taskFactory);
            InstalledPackagesViewModel = new InstalledPackagesViewModel(solution, packageManagementEvents, registeredPackageRepositories, packageViewModelFactory, taskFactory);
            UpdatedPackagesViewModel = new UpdatedPackagesViewModel(solution, packageManagementEvents, registeredPackageRepositories, updatedPackageViewModelFactory, taskFactory);
            RecentPackagesViewModel = new RecentPackagesViewModel(solution, packageManagementEvents, registeredPackageRepositories, packageViewModelFactory, taskFactory);
        }
Example #7
0
        public AddPackageReferenceViewModel(
            IPackageManagementService packageManagementService,
            ITaskFactory taskFactory)
        {
            this.packageManagementService = packageManagementService;
            this.packageManagementService.OutputMessagesView.Clear();

            availablePackagesViewModel = new AvailablePackagesViewModel(packageManagementService, this, taskFactory);
            installedPackagesViewModel = new InstalledPackagesViewModel(packageManagementService, this, taskFactory);
            packageUpdatesViewModel    = new PackageUpdatesViewModel(packageManagementService, this, taskFactory);
            recentPackagesViewModel    = new RecentPackagesViewModel(packageManagementService, this, taskFactory);

            availablePackagesViewModel.ReadPackages();
            installedPackagesViewModel.ReadPackages();
            packageUpdatesViewModel.ReadPackages();
            recentPackagesViewModel.ReadPackages();
        }