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

            return(1);
        }
예제 #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));
 }
예제 #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);
     }
 }
예제 #4
0
 public override bool Equals(PowerShellVersion other) => other is InvalidPowerShellVersion && string.Equals(this.OriginalString, other.OriginalString, StringComparison.OrdinalIgnoreCase);