Represents a package repository that implements a dependency provider.
Inheritance: IDependencyResolver, IServiceBasedRepository, IPackageLookup, ILatestPackageLookup, IOperationAwareRepository
Exemplo n.º 1
0
        /// <summary>
        /// Creates a VsPackageManager that is used to manage install packages.
        /// The local repository is used as the primary source, and other active sources are
        /// used as fall back repository. When all needed packages are available in the local
        /// repository, which is the normal case, this package manager will not need to query
        /// any remote sources at all. Other active sources are
        /// used as fall back repository so that it still works even if user has used
        /// install-package -IgnoreDependencies.
        /// </summary>
        /// <returns>The VsPackageManager created.</returns>
        public IVsPackageManager CreatePackageManagerToManageInstalledPackages()
        {
            RepositoryInfo info = GetRepositoryInfo();
            var            aggregateRepository = _packageSourceProvider.CreateAggregateRepository(
                _repositoryFactory, ignoreFailingRepositories: true);

            aggregateRepository.ResolveDependenciesVertically = true;
            var fallbackRepository = new FallbackRepository(info.Repository, aggregateRepository);

            return(CreatePackageManager(fallbackRepository, useFallbackForDependencies: false));
        }
Exemplo n.º 2
0
 /// <summary>
 /// Creates a VsPackageManager that is used to manage install packages.
 /// The local repository is used as the primary source, and other active sources are 
 /// used as fall back repository. When all needed packages are available in the local 
 /// repository, which is the normal case, this package manager will not need to query
 /// any remote sources at all. Other active sources are 
 /// used as fall back repository so that it still works even if user has used 
 /// install-package -IgnoreDependencies.
 /// </summary>
 /// <returns>The VsPackageManager created.</returns>
 public IVsPackageManager CreatePackageManagerToManageInstalledPackages()
 {
     RepositoryInfo info = GetRepositoryInfo();
     var aggregateRepository = _packageSourceProvider.CreateAggregateRepository(
         _repositoryFactory, ignoreFailingRepositories: true);
     aggregateRepository.ResolveDependenciesVertically = true;
     var fallbackRepository = new FallbackRepository(info.Repository, aggregateRepository);
     return CreatePackageManager(fallbackRepository, useFallbackForDependencies: false);
 }