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();
        }
		void CreateCacheUsingPackageSources()
		{
			nuGetPackageSource = new PackageSource("http://nuget.org", "NuGet");
			fakePackageRepositoryFactory = new FakePackageRepositoryFactory();
			RegisteredPackageSources packageSources = packageSourcesHelper.Options.PackageSources;
			IList<RecentPackageInfo> recentPackages = packageSourcesHelper.Options.RecentPackages;
			cache = new PackageRepositoryCache(fakePackageRepositoryFactory, packageSources, recentPackages);
		}
		void CreateViewModel ()
		{
			var options = new TestablePackageManagementOptions ();
			packageSources = options.PackageSources;
			packageSources.Clear ();

			var cache = new PackageRepositoryCache (packageSources, new RecentPackageInfo [0]);
			registeredRepositories = new RegisteredPackageRepositories (cache, options);

			viewModel = new RegisteredPackageSourcesViewModel (registeredRepositories);
		}
        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);
            solution = new PackageManagementSolution(registeredPackageRepositories, packageManagementEvents);
            packageActionRunner = new PackageActionRunner(packageManagementEvents);
        }
		void CreateViewModel ()
		{
			var properties = new Properties ();
			var settings = new FakeSettings ();
			var options = new PackageManagementOptions (properties, settings);
			packageSources = options.PackageSources;
			packageSources.Clear ();

			var cache = new PackageRepositoryCache (packageSources, new RecentPackageInfo [0]);
			registeredRepositories = new RegisteredPackageRepositories (cache, options);

			viewModel = new RegisteredPackageSourcesViewModel (registeredRepositories);
		}
        static PackageManagementServices()
        {
            options = new PackageManagementOptions();
            packageRepositoryCache        = new PackageRepositoryCache(options.PackageSources, options.RecentPackages);
            userAgentGenerator            = new UserAgentGeneratorForRepositoryRequests(packageRepositoryCache);
            registeredPackageRepositories = new RegisteredPackageRepositories(packageRepositoryCache, options);
            //projectTemplatePackageSources = new RegisteredProjectTemplatePackageSources();
            //projectTemplatePackageRepositoryCache = new ProjectTemplatePackageRepositoryCache(packageRepositoryCache, projectTemplatePackageSources);

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

            InitializeCredentialProvider();
        }
        static PackageManagementServices()
        {
            options = new PackageManagementOptions();
            packageRepositoryCache = new PackageRepositoryCache(options.PackageSources, options.RecentPackages);
            userAgentGenerator = new UserAgentGeneratorForRepositoryRequests(packageRepositoryCache);
            registeredPackageRepositories = new RegisteredPackageRepositories(packageRepositoryCache, options);
            //projectTemplatePackageSources = new RegisteredProjectTemplatePackageSources();
            //projectTemplatePackageRepositoryCache = new ProjectTemplatePackageRepositoryCache(packageRepositoryCache, projectTemplatePackageSources);

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

            InitializeCredentialProvider();
        }
		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);
        }
		void CreateCacheUsingPackageSources (ISharpDevelopPackageRepositoryFactory repositoryFactory)
		{
			nuGetPackageSource = new PackageSource ("http://nuget.org", "NuGet");
			machineCache = new FakePackageRepository ();
			cache = new PackageRepositoryCache (packageSourcesHelper.Options, machineCache, repositoryFactory);
		}
 void CreateCacheUsingPackageSources()
 {
     nuGetPackageSource = new PackageSource("http://nuget.org", "NuGet");
     fakePackageRepositoryFactory = new FakePackageRepositoryFactory();
     cache = new PackageRepositoryCache(packageSourcesHelper.Options, fakePackageRepositoryFactory);
 }
		void CreateCache()
		{
			nuGetPackageSource = new PackageSource("http://nuget.org", "NuGet");
			fakePackageRepositoryFactory = new FakePackageRepositoryFactory();
			cache = new PackageRepositoryCache(fakePackageRepositoryFactory);
		}