示例#1
0
 public bool IsCompatableWith(Package package)
 {
     return package.Version > Version
         ? package.MinPolicy <= package.Version && package.MaxPolicy >= Version : MinPolicy <= package.Version && MaxPolicy >= package.Version;
 }
示例#2
0
        public static Package GetPackage(string canonicalName)
        {
            lock (_allPackages) {
                if (_allPackages.ContainsKey(canonicalName)) {
                    return _allPackages[canonicalName];
                }

                var packageName = PackageName.Parse(canonicalName);

                var result = new Package {
                    CanonicalName = canonicalName,
                    Name = packageName.Name,
                    Architecture = packageName.Arch,
                    Version = packageName.Version,
                    PublicKeyToken = packageName.PublicKeyToken
                };

                _allPackages.Add(canonicalName, result);
                return result;
            }
        }
 internal PackageHasPotentialUpgradesException(Package unsatisfiedPackage, IEnumerable<Package> satisfactionOptions)
 {
     UnsatisfiedPackage = unsatisfiedPackage;
     SatifactionOptions = satisfactionOptions;
 }