private static IEnumerable <IPackage> FindCompatiblePackages(IDependencyResolver2 dependencyResolver, IPackageConstraintProvider constraintProvider, IEnumerable <string> packageIds, IPackage package, FrameworkName targetFramework, bool allowPrereleaseVersions) => (from p in dependencyResolver.FindPackages(packageIds) where allowPrereleaseVersions || p.IsReleaseVersion() let dependency = p.FindDependency(package.Id, targetFramework) let otherConstaint = constraintProvider.GetConstraint(p.Id) where (dependency != null) && (dependency.VersionSpec.Satisfies(package.Version) && ((otherConstaint == null) || otherConstaint.Satisfies(package.Version))) select p);
public InstallWalker(IPackageRepository localRepository, IDependencyResolver2 dependencyResolver, IPackageConstraintProvider constraintProvider, FrameworkName targetFramework, ILogger logger, bool ignoreDependencies, bool allowPrereleaseVersions, DependencyVersion dependencyVersion) : base(targetFramework) { if (dependencyResolver == null) { throw new ArgumentNullException("dependencyResolver"); } if (localRepository == null) { throw new ArgumentNullException("localRepository"); } if (logger == null) { throw new ArgumentNullException("logger"); } Repository = localRepository; Logger = logger; DependencyResolver = dependencyResolver; _ignoreDependencies = ignoreDependencies; ConstraintProvider = constraintProvider; _operations = new OperationLookup(); _allowPrereleaseVersions = allowPrereleaseVersions; DependencyVersion = dependencyVersion; CheckDowngrade = true; }
public InstallWalker(IPackageRepository localRepository, IDependencyResolver2 dependencyResolver, IPackageConstraintProvider constraintProvider, FrameworkName targetFramework, ILogger logger, bool ignoreDependencies, bool allowPrereleaseVersions, DependencyVersion dependencyVersion) : base(targetFramework) { this._packagesToKeep = new HashSet <IPackage>((IEqualityComparer <IPackage>)PackageEqualityComparer.IdAndVersion); if (dependencyResolver == null) { throw new ArgumentNullException("dependencyResolver"); } if (localRepository == null) { throw new ArgumentNullException("localRepository"); } if (logger == null) { throw new ArgumentNullException("logger"); } this.Repository = localRepository; this.Logger = logger; this.DependencyResolver = dependencyResolver; this._ignoreDependencies = ignoreDependencies; this.ConstraintProvider = constraintProvider; this._operations = new OperationLookup(); this._allowPrereleaseVersions = allowPrereleaseVersions; base.DependencyVersion = dependencyVersion; this.CheckDowngrade = true; }
// this ctor is used for unit tests internal InstallWalker(IPackageRepository localRepository, IDependencyResolver2 dependencyResolver, ILogger logger, bool ignoreDependencies, bool allowPrereleaseVersions, DependencyVersion dependencyVersion) : this(localRepository, dependencyResolver, null, logger, ignoreDependencies, allowPrereleaseVersions, dependencyVersion) { }
public CoreInteropPackageManager( ISharedPackageRepository sharedRepo, IDependencyResolver2 dependencyResolver, CoreInteropSourceRepository sourceRepo) { _sharedRepo = sharedRepo; _sourceRepo = sourceRepo; DependencyResolver = dependencyResolver; }
public ActionResolver( SourceRepository source, SourceRepository dependencyResolutionSource, ResolutionContext context) { _source = source; _dependencyResolver = new DependencyResolverFromSourceRepo(dependencyResolutionSource); _context = context; }
// this ctor is used for unit tests internal UpdateWalker(IPackageRepository localRepository, IDependencyResolver2 sourceRepository, IDependentsResolver dependentsResolver, IPackageConstraintProvider constraintProvider, ILogger logger, bool updateDependencies, bool allowPrereleaseVersions) : this(localRepository, sourceRepository, dependentsResolver, constraintProvider, null, logger, updateDependencies, allowPrereleaseVersions) { }
public UpdateWalker(IPackageRepository localRepository, IDependencyResolver2 sourceRepository, IDependentsResolver dependentsResolver, IPackageConstraintProvider constraintProvider, FrameworkName targetFramework, ILogger logger, bool updateDependencies, bool allowPrereleaseVersions) : base(localRepository, sourceRepository, constraintProvider, targetFramework, logger, !updateDependencies, allowPrereleaseVersions, DependencyVersion.Lowest) { _dependentsResolver = dependentsResolver; AcceptedTargets = PackageTargets.All; }
public CoreInteropProjectManager( InstallationTarget target, SourceRepository activeSource, IDependencyResolver2 dependencyResolver) { // Get the required features from the target _sharedRepo = target.GetRequiredFeature <ISharedPackageRepository>(); _refRepo = target.GetRequiredFeature <IProjectManager>().LocalRepository; _projectSystem = target.TryGetFeature <IProjectSystem>(); _target = target; _sourceRepo = new CoreInteropSourceRepository(activeSource); _pacman = new CoreInteropPackageManager( _sharedRepo, dependencyResolver, _sourceRepo); }
public InstallWalker(IPackageRepository localRepository, IDependencyResolver2 dependencyResolver, FrameworkName targetFramework, ILogger logger, bool ignoreDependencies, bool allowPrereleaseVersions, DependencyVersion dependencyVersion) : this(localRepository, dependencyResolver, constraintProvider : NullConstraintProvider.Instance, targetFramework : targetFramework, logger : logger, ignoreDependencies : ignoreDependencies, allowPrereleaseVersions : allowPrereleaseVersions, dependencyVersion : dependencyVersion) { }
public InstallWalker(IPackageRepository localRepository, IDependencyResolver2 dependencyResolver, FrameworkName targetFramework, ILogger logger, bool ignoreDependencies, bool allowPrereleaseVersions, DependencyVersion dependencyVersion) : this(localRepository, dependencyResolver, constraintProvider: NullConstraintProvider.Instance, targetFramework: targetFramework, logger: logger, ignoreDependencies: ignoreDependencies, allowPrereleaseVersions: allowPrereleaseVersions, dependencyVersion: dependencyVersion) { }
public CoreInteropProjectManager( InstallationTarget target, SourceRepository activeSource, IDependencyResolver2 dependencyResolver) { // Get the required features from the target _sharedRepo = target.GetRequiredFeature<ISharedPackageRepository>(); _refRepo = target.GetRequiredFeature<IProjectManager>().LocalRepository; _projectSystem = target.TryGetFeature<IProjectSystem>(); _target = target; _sourceRepo = new CoreInteropSourceRepository(activeSource); _pacman = new CoreInteropPackageManager( _sharedRepo, dependencyResolver, _sourceRepo); }
private static IEnumerable<IPackage> FindCompatiblePackages( IDependencyResolver2 dependencyResolver, IPackageConstraintProvider constraintProvider, IEnumerable<string> packageIds, IPackage package, FrameworkName targetFramework, bool allowPrereleaseVersions) { return (from p in dependencyResolver.FindPackages(packageIds) where allowPrereleaseVersions || p.IsReleaseVersion() let dependency = p.FindDependency(package.Id, targetFramework) let otherConstaint = constraintProvider.GetConstraint(p.Id) where dependency != null && dependency.VersionSpec.Satisfies(package.Version) && (otherConstaint == null || otherConstaint.Satisfies(package.Version)) select p); }