/// <summary> /// Compares the <see cref="Measurement"/> with an <see cref="ITimeSeriesValue"/>. /// </summary> /// <param name="other">The <see cref="ITimeSeriesValue"/> to compare with the current <see cref="Measurement"/>.</param> /// <returns>A 32-bit signed integer that indicates the relative order of the objects being compared.</returns> /// <remarks>Measurement implementations should compare by hash code.</remarks> public int CompareTo(ITimeSeriesValue other) { if ((object)other != null) { return(GetHashCode().CompareTo(other.GetHashCode())); } return(1); }
/// <summary> /// Compares the <see cref="Measurement"/> with an <see cref="ITimeSeriesValue"/>. /// </summary> /// <param name="other">The <see cref="ITimeSeriesValue"/> to compare with the current <see cref="Measurement"/>.</param> /// <returns>A 32-bit signed integer that indicates the relative order of the objects being compared.</returns> /// <remarks>Measurement implementations should compare by hash code.</remarks> public int CompareTo(ITimeSeriesValue other) { if ((object)other != null) return GetHashCode().CompareTo(other.GetHashCode()); return 1; }
/// <summary> /// Compares the <see cref="ChannelValueMeasurement{T}"/> with an <see cref="ITimeSeriesValue"/>. /// </summary> /// <param name="other">The <see cref="ITimeSeriesValue"/> to compare with the current <see cref="ChannelValueMeasurement{T}"/>.</param> /// <returns>A 32-bit signed integer that indicates the relative order of the objects being compared.</returns> /// <remarks>Measurement implementations should compare by hash code.</remarks> public int CompareTo(ITimeSeriesValue other) { return(GetHashCode().CompareTo(other.GetHashCode())); }