public Version GetMaxVersion(DependencyInfo dependency)
        {
            var maxVersion =
                _dependencyInfos.Where(x => x.PackageID == dependency.PackageID).Max(dependencyInfo =>
            {
                Version result;
                if (Version.TryParse(dependencyInfo.Version, out result))
                {
                    return(result);
                }
                else
                {
                    return(new Version(0, 0, 0));
                }
            });

            return(maxVersion);
        }
Exemple #2
0
 protected bool Equals(DependencyInfo other)
 {
     return(string.Equals(RepoName, other.RepoName) && string.Equals(PackageID, other.PackageID) && string.Equals(Version, other.Version));
 }