public override int CompareTo(PowerShellVersion other) { if (other is InvalidPowerShellVersion) { return(string.Compare(this.OriginalString, other.OriginalString, StringComparison.OrdinalIgnoreCase)); } return(1); }
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)); }
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); } }
public override bool Equals(PowerShellVersion other) => other is InvalidPowerShellVersion && string.Equals(this.OriginalString, other.OriginalString, StringComparison.OrdinalIgnoreCase);