public override int CompareTo(IValue other) { if (other?.DataType == DataType.String) { return(String.Compare(_value, other.AsString(), StringComparison.Ordinal)); } throw RuntimeException.ComparisonNotSupportedException(); }
public int CompareTo(IValue other) { GuidWrapper otherUuid = other.GetRawValue() as GuidWrapper; if (otherUuid == null) { throw RuntimeException.ComparisonNotSupportedException(); } return(_value.CompareTo(otherUuid._value)); }
public int CompareTo(IValue other) { if (other.SystemType.Equals(this.SystemType)) { if (this.Equals(other)) { return(0); } else { throw RuntimeException.ComparisonNotSupportedException(); } } else { return(this.SystemType.ToString().CompareTo(other.SystemType.ToString())); } }
public void Invalid_Comparison_Undefined() { var v1 = ValueFactory.Create(); var v2 = ValueFactory.Create(true); try { v1.CompareTo(v2); } catch (RuntimeException e) { var validExc = RuntimeException.ComparisonNotSupportedException(); Assert.True(e.Message == validExc.Message); return; } throw new Exception("No exception thrown"); }
public virtual int CompareTo(IValue other) { throw RuntimeException.ComparisonNotSupportedException(); }