コード例 #1
0
 int System.IComparable.CompareTo(object obj)
 {
     if (obj == null)
     {
         return(1);
     }
     return(JValue.Compare(this._valueType, this._value, (obj is JValue ? ((JValue)obj).Value : obj)));
 }
コード例 #2
0
 private static bool ValuesEquals(JValue v1, JValue v2)
 {
     if (v1 == v2)
     {
         return(true);
     }
     return(v1._valueType == v2._valueType && JValue.Compare(v1._valueType, v1._value, v2._value) == 0);
 }
コード例 #3
0
 public int CompareTo(JValue obj)
 {
     if (obj == null)
     {
         return(1);
     }
     return(JValue.Compare(this._valueType, this._value, obj._value));
 }
コード例 #4
0
 /// <summary>
 /// Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
 /// </summary>
 /// <param name="obj">An object to compare with this instance.</param>
 /// <returns>
 /// A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has these meanings:
 /// Value
 /// Meaning
 /// Less than zero
 /// This instance is less than <paramref name="obj" />.
 /// Zero
 /// This instance is equal to <paramref name="obj" />.
 /// Greater than zero
 /// This instance is greater than <paramref name="obj" />.
 /// </returns>
 /// <exception cref="T:System.ArgumentException">
 ///     <paramref name="obj" /> is not the same type as this instance.
 /// </exception>
 public int CompareTo(JValue obj)
 {
     return(obj == null ? 1 : JValue.Compare(this._valueType, this._value, obj._value));
 }
コード例 #5
0
 int IComparable.CompareTo(object obj)
 {
     return(obj == null ? 1 : JValue.Compare(this._valueType, this._value, obj is JValue ? ((JValue)obj).Value : obj));
 }