///<summary> ///Determines whether the specified <see cref="T:HFM.Core.DataTypes.UnitFrame"></see> is equal to the current <see cref="T:HFM.Core.DataTypes.UnitFrame"></see>. ///</summary> ///<returns> ///true if the specified <see cref="T:HFM.Core.DataTypes.UnitFrame"></see> is equal to the current <see cref="T:HFM.Core.DataTypes.UnitFrame"></see>; otherwise, false. ///</returns> ///<param name="other">The <see cref="T:HFM.Core.DataTypes.UnitFrame"></see> to compare with the current <see cref="T:HFM.Core.DataTypes.UnitFrame"></see>.</param> public bool Equals(UnitFrame other) { if (other == null) { return(false); } return(FrameID.Equals(other.FrameID) && TimeOfFrame.Equals(other.TimeOfFrame) && FrameDuration.Equals(other.FrameDuration)); }
///<summary> ///Compares the current object with another object of the same type. ///</summary> ///<returns> ///A 32-bit signed integer 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 other parameter.Zero This object is equal to other. Greater than zero This object is greater than other. ///</returns> ///<param name="other">An object to compare with this object.</param> public int CompareTo(UnitFrame other) { if (other == null) { return(1); } if (FrameID.Equals(other.FrameID)) { if (TimeOfFrame.Equals(other.TimeOfFrame)) { if (FrameDuration.Equals(other.FrameDuration)) { return(0); } return(FrameDuration.CompareTo(other.FrameDuration)); } return(TimeOfFrame.CompareTo(other.TimeOfFrame)); } return(FrameID.CompareTo(other.FrameID)); }