} // constructor /// <summary> /// Compares the current object with another object of the same type. /// </summary> /// <returns> /// A value that indicates the relative order of the objects being compared. /// The return value has the following meanings: Value Meaning Less than zero This object is less than /// the <paramref name="other"/> parameter.Zero This object is equal to <paramref name="other"/>. /// Greater than zero This object is greater than <paramref name="other"/>. /// </returns> /// <param name="other">An object to compare with this object.</param> public override int CompareTo(TInterval <decimal> other) { if (other == null) { throw new ArgumentNullException(); } return(Right.CompareTo(other.Right)); } // CompareTo
/// <summary> /// Initializes a new instance. /// </summary> /// <param name="interval"></param> /// <param name="start"></param> /// <param name="end"></param> public IntervalNode(TInterval interval) { if (!(interval.Start.CompareTo(interval.End) <= 0)) { throw new ArgumentOutOfRangeException("The supplied interval has an invalid range, where start is greater than end"); } Interval = interval; // copy start and end off interval value Start = interval.Start; End = interval.End; UpdateMaxEndPoint(); }