/// <summary> /// Compare this instance to another object that implements /// <see cref="IProfileMetaData"/>. /// </summary> /// <param name="other"> /// The <see cref="IProfileMetaData"/> 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(IProfileMetaData other) { if (other == null) { return(-1); } return(ProfileId.CompareTo(other.ProfileId)); }
/// <summary> /// Check if this instance is equal to another object that /// implements <see cref="IProfileMetaData"/>. /// </summary> /// <param name="other"> /// The <see cref="IProfileMetaData"/> to check for equality /// </param> /// <returns> /// True if the two instances are equal. /// False otherwise /// </returns> public bool Equals(IProfileMetaData other) { if (other == null) { return(false); } return(ProfileId.Equals(other.ProfileId)); }