Пример #1
0
 public void Dispose()
 {
     AvailablePackagesViewModel.Dispose();
     InstalledPackagesViewModel.Dispose();
     RecentPackagesViewModel.Dispose();
     UpdatedPackagesViewModel.Dispose();
 }
Пример #2
0
 public void ReadPackages()
 {
     AvailablePackagesViewModel.ReadPackages();
     InstalledPackagesViewModel.ReadPackages();
     UpdatedPackagesViewModel.ReadPackages();
     RecentPackagesViewModel.ReadPackages();
 }
		void CreateViewModel(FakePackageManagementSolution solution)
		{
			registeredPackageRepositories = new FakeRegisteredPackageRepositories();
			var packageViewModelFactory = new FakePackageViewModelFactory();
			taskFactory = new FakeTaskFactory();
			packageManagementEvents = new PackageManagementEvents();
			
			viewModel = new InstalledPackagesViewModel(
				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);
        }
Пример #5
0
        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);
        }
Пример #6
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();
        }
		void CreateViewModel(FakePackageManagementService packageManagementService)
		{
			taskFactory = new FakeTaskFactory();
			var messageReporter = new FakeMessageReporter();
			viewModel = new InstalledPackagesViewModel(packageManagementService, messageReporter, taskFactory);			
		}