public int CompareTo(MarginTradingAccount other) { var result = Id.CompareTo(other.Id); if (0 != result) { return(result); } return(ClientId.CompareTo(other.ClientId)); }
/// <summary> /// Compares this <see cref="UserAssignedIdentity"/> with another instance. /// </summary> /// <param name="other"> <see cref="UserAssignedIdentity"/> object to compare. </param> /// <returns> -1 for less than, 0 for equals, 1 for greater than. </returns> public int CompareTo(UserAssignedIdentity other) { if (other == null) { return(1); } int compareResult = 0; if ((compareResult = ClientId.CompareTo(other.ClientId)) == 0 && (compareResult = PrincipalId.CompareTo(other.PrincipalId)) == 0) { return(0); } return(compareResult); }