/// <inheritdoc />
 bool IEquatable <IUniformResourceIdentifier> .Equals(IUniformResourceIdentifier other) => ComparableImplementations.ImplementEquals(DefaultComparer, this, other);
예제 #2
0
 /// <summary>
 /// Returns a value indicating the relative order of this instance and the specified object: a negative value if this instance is less than the specified object; zero if this instance is equal to the specified object; and a positive value if this instance is greater than the specified object.
 /// </summary>
 /// <param name="obj">The object to compare with this instance.</param>
 /// <returns>A value indicating the relative order of this instance and the specified object: a negative value if this instance is less than the specified object; zero if this instance is equal to the specified object; and a positive value if this instance is greater than the specified object.</returns>
 int IComparable.CompareTo(object obj)
 {
     return(ComparableImplementations.ImplementCompareTo(DefaultComparer, this, obj));
 }
 /// <summary>
 /// Returns a value indicating the relative order of this instance and the specified object: a negative value if this instance is less than the specified object; zero if this instance is equal to the specified object; and a positive value if this instance is greater than the specified object.
 /// </summary>
 /// <param name="other">The object to compare with this instance.</param>
 /// <returns>A value indicating the relative order of this instance and the specified object: a negative value if this instance is less than the specified object; zero if this instance is equal to the specified object; and a positive value if this instance is greater than the specified object.</returns>
 public int CompareTo(T other)
 {
     Contract.Assume(DefaultComparer != null);
     return(ComparableImplementations.ImplementCompareTo(DefaultComparer, (T)this, other));
 }
 /// <summary>
 /// Returns <c>true</c> if <paramref name="left"/> has a value that is greater than or equal to the value of <paramref name="right"/>.
 /// </summary>
 /// <param name="left">A value of type <typeparamref name="T"/> or <c>null</c>.</param>
 /// <param name="right">A value of type <typeparamref name="T"/> or <c>null</c>.</param>
 /// <returns><c>true</c> if <paramref name="left"/> has a value that is greater than or equal to the value of <paramref name="right"/>; otherwise, <c>false</c>.</returns>
 public static bool operator >=(ComparableBaseWithOperators <T> left, ComparableBaseWithOperators <T> right)
 {
     return(ComparableImplementations.ImplementOpGreaterThanOrEqual(DefaultComparer, (T)left, (T)right));
 }
예제 #5
0
 /// <summary>
 /// Returns a value indicating whether this instance is equal to the specified object.
 /// </summary>
 /// <param name="obj">The object to compare with this instance.</param>
 /// <returns>A value indicating whether this instance is equal to the specified object.</returns>
 public override bool Equals(object obj)
 {
     return(ComparableImplementations.ImplementEquals(DefaultComparer, this, obj));
 }
예제 #6
0
 /// <summary>
 /// Returns a value indicating the relative order of this instance and the specified object: a negative value if this instance is less than the specified object; zero if this instance is equal to the specified object; and a positive value if this instance is greater than the specified object.
 /// </summary>
 /// <param name="other">The object to compare with this instance.</param>
 /// <returns>A value indicating the relative order of this instance and the specified object: a negative value if this instance is less than the specified object; zero if this instance is equal to the specified object; and a positive value if this instance is greater than the specified object.</returns>
 public int CompareTo(T other) => ComparableImplementations.ImplementCompareTo(DefaultComparer, (T)this, other);
 /// <summary>
 /// Returns <c>true</c> if two <typeparamref name="T"/> objects have different values.
 /// </summary>
 /// <param name="left">A value of type <typeparamref name="T"/> or <c>null</c>.</param>
 /// <param name="right">A value of type <typeparamref name="T"/> or <c>null</c>.</param>
 /// <returns><c>true</c> if two <typeparamref name="T"/> objects have different values; otherwise, <c>false</c>.</returns>
 public static bool operator !=(ComparableBaseWithOperators <T> left, ComparableBaseWithOperators <T> right)
 {
     return(ComparableImplementations.ImplementOpInequality(DefaultComparer, (T)left, (T)right));
 }
 /// <summary>
 /// Gets the hash code for this instance.
 /// </summary>
 /// <returns>The hash code for this instance.</returns>
 public override int GetHashCode()
 {
     Contract.Assume(DefaultComparer != null);
     return(ComparableImplementations.ImplementGetHashCode(DefaultComparer, (T)this));
 }
 /// <summary>
 /// Returns a value indicating whether this instance is equal to the specified object.
 /// </summary>
 /// <param name="obj">The object to compare with this instance.</param>
 /// <returns>A value indicating whether this instance is equal to the specified object.</returns>
 public override bool Equals(object obj)
 {
     Contract.Assume(DefaultComparer != null);
     return(ComparableImplementations.ImplementEquals(DefaultComparer, (T)this, obj));
 }
예제 #10
0
 /// <summary>
 /// Returns <c>true</c> if <paramref name="left"/> has a value that is greater than the value of <paramref name="right"/>.
 /// </summary>
 /// <param name="left">A value of type <typeparamref name="T"/> or <c>null</c>.</param>
 /// <param name="right">A value of type <typeparamref name="T"/> or <c>null</c>.</param>
 /// <returns><c>true</c> if <paramref name="left"/> has a value that is greater than the value of <paramref name="right"/>; otherwise, <c>false</c>.</returns>
 public static bool operator >(ComparableBaseWithOperators <T> left, ComparableBaseWithOperators <T> right) =>
 ComparableImplementations.ImplementOpGreaterThan(DefaultComparer, (T)left, (T)right);
예제 #11
0
 /// <summary>
 /// Returns <c>true</c> if <paramref name="left"/> has a value that is less than or equal to the value of <paramref name="right"/>.
 /// </summary>
 /// <param name="left">A value of type <typeparamref name="T"/> or <c>null</c>.</param>
 /// <param name="right">A value of type <typeparamref name="T"/> or <c>null</c>.</param>
 /// <returns><c>true</c> if <paramref name="left"/> has a value that is less than or equal to the value of <paramref name="right"/>; otherwise, <c>false</c>.</returns>
 public static bool operator <=(ComparableBaseWithOperators <T> left, ComparableBaseWithOperators <T> right) =>
 ComparableImplementations.ImplementOpLessThanOrEqual(DefaultComparer, (T)left, (T)right);
예제 #12
0
 /// <summary>
 /// Returns <c>true</c> if two <typeparamref name="T"/> objects have the same value.
 /// </summary>
 /// <param name="left">A value of type <typeparamref name="T"/> or <c>null</c>.</param>
 /// <param name="right">A value of type <typeparamref name="T"/> or <c>null</c>.</param>
 /// <returns><c>true</c> if two <typeparamref name="T"/> objects have the same value; otherwise, <c>false</c>.</returns>
 public static bool operator ==(EquatableBaseWithOperators <T>?left, EquatableBaseWithOperators <T>?right) =>
 ComparableImplementations.ImplementOpEquality(DefaultComparer, (T)left !, (T)right !);
예제 #13
0
 /// <summary>
 /// Returns a value indicating whether this instance is equal to the specified object.
 /// </summary>
 /// <param name="obj">The object to compare with this instance.</param>
 /// <returns>A value indicating whether this instance is equal to the specified object.</returns>
 public override bool Equals(object obj) => ComparableImplementations.ImplementEquals(DefaultComparer, (T)this, obj);
예제 #14
0
 /// <summary>
 /// Returns <c>true</c> if two <typeparamref name="T"/> objects have different values.
 /// </summary>
 /// <param name="left">A value of type <typeparamref name="T"/> or <c>null</c>.</param>
 /// <param name="right">A value of type <typeparamref name="T"/> or <c>null</c>.</param>
 /// <returns><c>true</c> if two <typeparamref name="T"/> objects have different values; otherwise, <c>false</c>.</returns>
 public static bool operator !=(EquatableBaseWithOperators <T> left, EquatableBaseWithOperators <T> right)
 {
     Contract.Assume(DefaultComparer != null);
     return(ComparableImplementations.ImplementOpInequality(DefaultComparer, (T)left, (T)right));
 }
 /// <inheritdoc />
 int IComparable <IUniformResourceIdentifier> .CompareTo(IUniformResourceIdentifier other) => ComparableImplementations.ImplementCompareTo(DefaultComparer, this, other);
 /// <summary>
 /// Returns a value indicating whether this instance is equal to the specified object.
 /// </summary>
 /// <param name="other">The object to compare with this instance.</param>
 /// <returns>A value indicating whether this instance is equal to the specified object.</returns>
 public bool Equals(T other)
 {
     Contract.Assume(DefaultComparer != null);
     return(ComparableImplementations.ImplementEquals(DefaultComparer, (T)this, other));
 }
예제 #17
0
 /// <summary>
 /// Returns a value indicating the relative order of this instance and the specified object: a negative value if this instance is less than the specified object; zero if this instance is equal to the specified object; and a positive value if this instance is greater than the specified object.
 /// </summary>
 /// <param name="obj">The object to compare with this instance.</param>
 /// <returns>A value indicating the relative order of this instance and the specified object: a negative value if this instance is less than the specified object; zero if this instance is equal to the specified object; and a positive value if this instance is greater than the specified object.</returns>
 int IComparable.CompareTo(object obj) => ComparableImplementations.ImplementCompareTo(DefaultComparer, this, obj);
예제 #18
0
 /// <summary>
 /// Returns <c>true</c> if two <typeparamref name="T"/> objects have different values.
 /// </summary>
 /// <param name="left">A value of type <typeparamref name="T"/> or <c>null</c>.</param>
 /// <param name="right">A value of type <typeparamref name="T"/> or <c>null</c>.</param>
 /// <returns><c>true</c> if two <typeparamref name="T"/> objects have different values; otherwise, <c>false</c>.</returns>
 public static bool operator !=(EquatableBaseWithOperators <T> left, EquatableBaseWithOperators <T> right) =>
 ComparableImplementations.ImplementOpInequality(DefaultComparer, (T)left, (T)right);
예제 #19
0
 /// <summary>
 /// Returns <c>true</c> if <paramref name="left"/> has a value that is less than or equal to the value of <paramref name="right"/>.
 /// </summary>
 /// <param name="left">A value of type <typeparamref name="T"/> or <c>null</c>.</param>
 /// <param name="right">A value of type <typeparamref name="T"/> or <c>null</c>.</param>
 /// <returns><c>true</c> if <paramref name="left"/> has a value that is less than or equal to the value of <paramref name="right"/>; otherwise, <c>false</c>.</returns>
 public static bool operator <=(ComparableBaseWithOperators <T> left, ComparableBaseWithOperators <T> right)
 {
     Contract.Assume(DefaultComparer != null);
     return(ComparableImplementations.ImplementOpLessThanOrEqual(DefaultComparer, (T)left, (T)right));
 }
예제 #20
0
 public int CompareTo(Derived2 other) => ComparableImplementations.ImplementCompareTo(DefaultComparer, this, other);
 /// <summary>
 /// Returns <c>true</c> if <paramref name="left"/> has a value that is less than the value of <paramref name="right"/>.
 /// </summary>
 /// <param name="left">A value of type <typeparamref name="T"/> or <c>null</c>.</param>
 /// <param name="right">A value of type <typeparamref name="T"/> or <c>null</c>.</param>
 /// <returns><c>true</c> if <paramref name="left"/> has a value that is less than the value of <paramref name="right"/>; otherwise, <c>false</c>.</returns>
 public static bool operator <(ComparableBaseWithOperators <T> left, ComparableBaseWithOperators <T> right)
 {
     return(ComparableImplementations.ImplementOpLessThan(DefaultComparer, (T)left, (T)right));
 }
예제 #22
0
 public override int CompareTo(object obj) => ComparableImplementations.ImplementCompareTo(DefaultComparer, this, obj);
예제 #23
0
 /// <summary>
 /// Gets the hash code for this instance.
 /// </summary>
 /// <returns>The hash code for this instance.</returns>
 public override int GetHashCode()
 {
     return(ComparableImplementations.ImplementGetHashCode(DefaultComparer, (T)this));
 }
예제 #24
0
 public bool Equals(Derived2 other) => ComparableImplementations.ImplementEquals(DefaultComparer, this, other);
예제 #25
0
 /// <summary>
 /// Returns a value indicating whether this instance is equal to the specified object.
 /// </summary>
 /// <param name="other">The object to compare with this instance.</param>
 /// <returns>A value indicating whether this instance is equal to the specified object.</returns>
 public bool Equals(T other)
 {
     return(ComparableImplementations.ImplementEquals(DefaultComparer, (T)this, other));
 }
예제 #26
0
 public override int GetHashCode() => ComparableImplementations.ImplementGetHashCode(DefaultComparer, this);
예제 #27
0
 /// <summary>
 /// Returns a value indicating the relative order of this instance and the specified object: a negative value if this instance is less than the specified object; zero if this instance is equal to the specified object; and a positive value if this instance is greater than the specified object.
 /// </summary>
 /// <param name="other">The object to compare with this instance.</param>
 /// <returns>A value indicating the relative order of this instance and the specified object: a negative value if this instance is less than the specified object; zero if this instance is equal to the specified object; and a positive value if this instance is greater than the specified object.</returns>
 public int CompareTo(T other)
 {
     return(ComparableImplementations.ImplementCompareTo(DefaultComparer, (T)this, other));
 }
 /// <summary>
 /// Returns a value indicating the relative order of this instance and the specified object: a negative value if this instance is less than the specified object; zero if this instance is equal to the specified object; and a positive value if this instance is greater than the specified object.
 /// </summary>
 /// <param name="obj">The object to compare with this instance.</param>
 /// <returns>A value indicating the relative order of this instance and the specified object: a negative value if this instance is less than the specified object; zero if this instance is equal to the specified object; and a positive value if this instance is greater than the specified object.</returns>
 int IComparable.CompareTo(object obj)
 {
     Contract.Assume(DefaultComparer != null);
     return(ComparableImplementations.ImplementCompareTo(DefaultComparer, this, obj));
 }