Exemple #1
0
 public PackageSelectionContext(PackageResolveResults incompatible)
 {
     _compatiblePackageVersions = new Stack <PackageResolveResults>();
     _compatiblePackageVersions.Push(new PackageResolveResults());
     _incompatiblePackages = new Stack <PackageResolveResults>();
     _incompatiblePackages.Push(new PackageResolveResults(incompatible));
 }
        public void PackageHasChildrenConflicting(PackageIdentifier identifier)
        {
            _compatiblePackageVersions.Pop();
            CompatiblePackageVersions.Remove(identifier);

            PackageResolveResults newIgnores = _incompatiblePackages.Pop();

            _incompatiblePackages.Pop();
            _incompatiblePackages.Push(newIgnores);
        }
        public void PackageSucceeds(PackageIdentifier packageNode, CallStack succeedingCallstack)
        {
            // commit the new ignore list
            PackageResolveResults ignoredPackagesInBranch = _incompatiblePackages.Pop();

            _incompatiblePackages.Pop();
            _incompatiblePackages.Push(ignoredPackagesInBranch);

            // add successful package
            PackageResolveResults foundPackages = _compatiblePackageVersions.Pop();

            foundPackages.Add(packageNode, successful: new[] { succeedingCallstack });
            _compatiblePackageVersions.Pop();
            _compatiblePackageVersions.Push(foundPackages);
        }
 public PackageResolveResults(PackageResolveResults source)
 {
     _source = source;
     _nodes  = source._nodes.ToDictionary(x => x.Key, x => new PackageResolutionStacks(x.Value.Successful, x.Value.Failed));
 }