/// <summary> /// Check if this instance is equal to another object that /// implements <see cref="IComponentMetaData"/>. /// </summary> /// <param name="other"> /// The <see cref="IComponentMetaData"/> to check for equality /// </param> /// <returns> /// True if the two instances are equal. /// False otherwise /// </returns> public bool Equals(IComponentMetaData other) { if (other == null) { return(false); } return(ComponentId.Equals(other.ComponentId)); }
/// <summary> /// Compare this instance to another object that implements /// <see cref="IComponentMetaData"/>. /// </summary> /// <param name="other"> /// The <see cref="IComponentMetaData"/> instance to compare to. /// </param> /// <returns> /// >0 if this instance precedes `other` in the sort order. /// 0 if they are equal in the sort order. /// <0 if `other` precedes this instance in the sort order. /// </returns> public int CompareTo(IComponentMetaData other) { if (other == null) { return(-1); } return(ComponentId.CompareTo(other.ComponentId)); }