Exemplo n.º 1
0
 KeyValuePair <PackageIdentifier, IPackageInfo>?NextAvailablePackageVersion(IEnumerable <PackageIdentifier> seen, PackageDependency dependency)
 {
     return((from packageById in from repo in _repositories
             from package in repo.FindAll(dependency)
             where _selectionContext.IsIgnored(package.Identifier) == false
             group package by package.Identifier
             where seen.Contains(packageById.Key) == false && packageById.Count() > 0
             orderby packageById.Key.Version descending
             select new KeyValuePair <PackageIdentifier, IPackageInfo>?(
                 new KeyValuePair <PackageIdentifier, IPackageInfo>(
                     packageById.Key,
                     packageById.First())))
            .FirstOrDefault());
 }
Exemplo n.º 2
0
        IPackageInfo NextAvailablePackageVersion(IEnumerable <PackageIdentifier> seen, PackageDependency dependency)
        {
            var availablePackages = Match(dependency).Where(_ => !_selectionContext.IsIgnored(_.Identifier) && !seen.Contains(_.Identifier));

            return(Select(availablePackages));
        }