/// <summary>
 /// Creates a new instance of the ProjectTemplatePackageRepositoryCache.
 /// </summary>
 /// <param name="packageRepositoryCache">The main package repository cache used
 /// with the Add Package Reference dialog.</param>
 public ProjectTemplatePackageRepositoryCache(
     IPackageRepositoryCache packageRepositoryCache,
     RegisteredProjectTemplatePackageSources registeredPackageSources)
 {
     this.packageRepositoryCache   = packageRepositoryCache;
     this.registeredPackageSources = registeredPackageSources;
 }
        static PackageManagementServices()
        {
            options = new PackageManagementOptions();
            packageRepositoryCache = new PackageRepositoryCache(options);
            userAgentGenerator     = new UserAgentGeneratorForRepositoryRequests();
            userAgentGenerator.Register(packageRepositoryCache);
            progressProvider = new PackageManagementProgressProvider(packageRepositoryCache);
            registeredPackageRepositories         = new RegisteredPackageRepositories(packageRepositoryCache, options);
            projectTemplatePackageSources         = new RegisteredProjectTemplatePackageSources();
            projectTemplatePackageRepositoryCache = new ProjectTemplatePackageRepositoryCache(projectTemplatePackageSources);

            outputMessagesView  = new PackageManagementOutputMessagesView(packageManagementEvents);
            solution            = new PackageManagementSolution(registeredPackageRepositories, projectService, packageManagementEvents);
            packageActionRunner = new PackageActionRunner(packageManagementEvents);

            progressMonitorFactory        = new PackageManagementProgressMonitorFactory();
            backgroundPackageActionRunner = new BackgroundPackageActionRunner(progressMonitorFactory, packageManagementEvents, progressProvider);

            projectTargetFrameworkMonitor = new ProjectTargetFrameworkMonitor(projectService);
            packageCompatibilityHandler   = new PackageCompatibilityHandler();
            packageCompatibilityHandler.MonitorTargetFrameworkChanges(projectTargetFrameworkMonitor);

            updatedPackagesInSolution = new UpdatedPackagesInSolution(solution, registeredPackageRepositories, packageManagementEvents);

            projectOperations = new PackageManagementProjectOperations(solution, registeredPackageRepositories, backgroundPackageActionRunner, packageManagementEvents);

            InitializeCredentialProvider();
        }
		/// <summary>
		/// Creates a new instance of the ProjectTemplatePackageRepositoryCache.
		/// </summary>
		/// <param name="packageRepositoryCache">The main package repository cache used
		/// with the Add Package Reference dialog.</param>
		public ProjectTemplatePackageRepositoryCache(
			IPackageRepositoryCache packageRepositoryCache,
			RegisteredProjectTemplatePackageSources registeredPackageSources)
		{
			this.packageRepositoryCache = packageRepositoryCache;
			this.registeredPackageSources = registeredPackageSources;
		}
		void CreateCache()
		{
			fakeMainCache = new FakePackageRepositoryFactory();
			var propertyService = new FakePropertyService();
			fakeSettingsFactory = new FakeSettingsFactory();
			registeredPackageSources = new RegisteredProjectTemplatePackageSources(propertyService, fakeSettingsFactory);
			cache = new ProjectTemplatePackageRepositoryCache(fakeMainCache, registeredPackageSources);
		}
		void CreateRegisteredPackageSources(List<PackageSource> packageSources, FakePropertyService propertyService)
		{
			fakeSettingsFactory = new FakeSettingsFactory();
			fakeSettingsFactory.FakeSettings.AddFakePackageSources(packageSources);
			registeredPackageSources = 
				new RegisteredProjectTemplatePackageSources(
					propertyService,
					fakeSettingsFactory);
		}
		static PackageManagementServices()
		{
			options = new PackageManagementOptions();
			packageRepositoryCache = new PackageRepositoryCache(options.PackageSources, options.RecentPackages);
			registeredPackageRepositories = new RegisteredPackageRepositories(packageRepositoryCache, options);
			projectTemplatePackageSources = new RegisteredProjectTemplatePackageSources();
			projectTemplatePackageRepositoryCache = new ProjectTemplatePackageRepositoryCache(packageRepositoryCache, projectTemplatePackageSources);
			
			outputMessagesView = new PackageManagementOutputMessagesView(packageManagementEvents);
			projectBrowserRefresher = new ProjectBrowserRefresher(projectService, packageManagementEvents);
			solution = new PackageManagementSolution(registeredPackageRepositories, packageManagementEvents);
			
			consoleHostProvider = new PackageManagementConsoleHostProvider(solution, registeredPackageRepositories);
			runPackageInitializationScripts = new RunPackageInitializationScriptsOnSolutionOpen(projectService);
			resetPowerShellWorkingDirectory = new ResetPowerShellWorkingDirectoryOnSolutionClosed(projectService, ConsoleHost);
			var consolePackageActionRunner = new ConsolePackageActionRunner(ConsoleHost, packageActionsToRun);
			packageActionRunner = new PackageActionRunner(consolePackageActionRunner, packageManagementEvents);
		}
        static PackageManagementServices()
        {
            options = new PackageManagementOptions();
            packageRepositoryCache                = new PackageRepositoryCache(options.PackageSources, options.RecentPackages);
            registeredPackageRepositories         = new RegisteredPackageRepositories(packageRepositoryCache, options);
            projectTemplatePackageSources         = new RegisteredProjectTemplatePackageSources();
            projectTemplatePackageRepositoryCache = new ProjectTemplatePackageRepositoryCache(packageRepositoryCache, projectTemplatePackageSources);

            outputMessagesView      = new PackageManagementOutputMessagesView(packageManagementEvents);
            projectBrowserRefresher = new ProjectBrowserRefresher(projectService, packageManagementEvents);
            solution = new PackageManagementSolution(registeredPackageRepositories, packageManagementEvents);

            consoleHostProvider             = new PackageManagementConsoleHostProvider(solution, registeredPackageRepositories);
            runPackageInitializationScripts = new RunPackageInitializationScriptsOnSolutionOpen(projectService);
            resetPowerShellWorkingDirectory = new ResetPowerShellWorkingDirectoryOnSolutionClosed(projectService, ConsoleHost);
            var consolePackageActionRunner = new ConsolePackageActionRunner(ConsoleHost, packageActionsToRun);

            packageActionRunner = new PackageActionRunner(consolePackageActionRunner, packageManagementEvents);
        }
Пример #8
0
        static PackageManagementServices()
        {
            options = new PackageManagementOptions();
            packageRepositoryCache = new PackageRepositoryCache(options.PackageSources, options.RecentPackages);
            userAgentGenerator     = new UserAgentGeneratorForRepositoryRequests();
            userAgentGenerator.Register(packageRepositoryCache);
            progressProvider = new PackageManagementProgressProvider(packageRepositoryCache);
            registeredPackageRepositories         = new RegisteredPackageRepositories(packageRepositoryCache, options);
            projectTemplatePackageSources         = new RegisteredProjectTemplatePackageSources();
            projectTemplatePackageRepositoryCache = new ProjectTemplatePackageRepositoryCache(projectTemplatePackageSources);

            outputMessagesView  = new PackageManagementOutputMessagesView(packageManagementEvents);
            solution            = new PackageManagementSolution(registeredPackageRepositories, packageManagementEvents);
            packageActionRunner = new PackageActionRunner(packageManagementEvents);

            progressMonitorFactory        = new PackageManagementProgressMonitorFactory();
            backgroundPackageActionRunner = new BackgroundPackageActionRunner(progressMonitorFactory, packageManagementEvents, progressProvider);

            InitializeCredentialProvider();
        }
Пример #9
0
 /// <summary>
 /// Creates a new instance of the ProjectTemplatePackageRepositoryCache.
 /// </summary>
 public ProjectTemplatePackageRepositoryCache(RegisteredProjectTemplatePackageSources registeredPackageSources)
 {
     this.packageRepositoryCache   = new PackageRepositoryCache(registeredPackageSources.PackageSources, new List <RecentPackageInfo>());
     this.registeredPackageSources = registeredPackageSources;
 }
		/// <summary>
		/// Creates a new instance of the ProjectTemplatePackageRepositoryCache.
		/// </summary>
		public ProjectTemplatePackageRepositoryCache(RegisteredProjectTemplatePackageSources registeredPackageSources)
		{
			this.packageRepositoryCache = new PackageRepositoryCache(registeredPackageSources.PackageSources, new List<RecentPackageInfo>());
			this.registeredPackageSources = registeredPackageSources;
		}