コード例 #1
0
		void CreateViewModel()
		{
			packageManagementService = new FakePackageManagementService();
			taskFactory = new FakeTaskFactory();
			var messageReporter = new FakeMessageReporter();
			viewModel = new PackageUpdatesViewModel(packageManagementService, messageReporter, taskFactory);
		}
コード例 #2
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();
        }