Пример #1
0
        private IPackageRepository CreateProjectManagerSourceRepository()
        {
            // The source repo for the project manager is the aggregate of the shared repo and the selected repo.
            // For dependency resolution, we want VS to look for packages in the selected source and then use the fallback logic
            var fallbackRepository = SourceRepository as FallbackRepository;

            if (fallbackRepository != null)
            {
                var primaryRepositories = new[] { _sharedRepository, fallbackRepository.SourceRepository.Clone() };
                return(new FallbackRepository(new AggregateRepository(primaryRepositories), fallbackRepository.DependencyResolver));
            }
            return(new AggregateRepository(new[] { _sharedRepository, SourceRepository.Clone() }));
        }
Пример #2
0
        IPackageRepository CreateProjectManagerSourceRepository()
        {
            var fallbackRepository = SourceRepository as FallbackRepository;

            if (fallbackRepository != null)
            {
                var primaryRepositories = new [] {
                    LocalRepository,
                    fallbackRepository.SourceRepository.Clone()
                };

                return(new FallbackRepository(
                           new AggregateRepository(primaryRepositories),
                           fallbackRepository.DependencyResolver));
            }
            return(new AggregateRepository(new [] { LocalRepository, SourceRepository.Clone() }));
        }