Beispiel #1
0
        public override int CompareTo(PowerShellVersion other)
        {
            if (other is InvalidPowerShellVersion)
            {
                return(string.Compare(this.OriginalString, other.OriginalString, StringComparison.OrdinalIgnoreCase));
            }

            return(1);
        }
Beispiel #2
0
 public override int CompareTo(PowerShellVersion other)
 {
     if (other is LegacyPowerShellVersion v)
     {
         return(this.CompareTo(v));
     }
     if (other is InvalidPowerShellVersion)
     {
         return(-1);
     }
     return(LegacyAndSemVerCompare(this, (SemVer2PowerShellVersion)other));
 }
Beispiel #3
0
 public override bool Equals(PowerShellVersion other)
 {
     if (other is LegacyPowerShellVersion l)
     {
         return(this.Equals(l));
     }
     else if (other is SemVer2PowerShellVersion v)
     {
         return(LegacyAndSemVerEquals(this, v));
     }
     else
     {
         return(false);
     }
 }
Beispiel #4
0
 public override bool Equals(PowerShellVersion other) => other is InvalidPowerShellVersion && string.Equals(this.OriginalString, other.OriginalString, StringComparison.OrdinalIgnoreCase);