Beispiel #1
0
 bool IEqualityComparer.Equals(object x, object y)
 {
     if (x == y)
     {
         return(true);
     }
     if (x is null || y is null)
     {
         return(false);
     }
     if (x is PackageVersion x1 && y is PackageVersion y1)
     {
         return(VersionExtension.Equals(x1, y1));
     }
     throw new ArgumentException("Invalid argument type, only PackageVersion supported.");
 }
Beispiel #2
0
 bool IEqualityComparer <PackageVersion> .Equals(PackageVersion x, PackageVersion y) => VersionExtension.Equals(x, y);