/// <summary> /// Returns true if StatusMessage instances are equal /// </summary> /// <param name="other">Instance of StatusMessage to be compared</param> /// <returns>Boolean</returns> public bool Equals(StatusMessage other) { // credit: http://stackoverflow.com/a/10454552/677735 if (other == null) { return(false); } return((Op == other.Op || Op != null && Op.Equals(other.Op)) && (Id == other.Id || Id != null && Id.Equals(other.Id)) && (ErrorMessage == other.ErrorMessage || ErrorMessage != null && ErrorMessage.Equals(other.ErrorMessage)) && (ErrorCode == other.ErrorCode || ErrorCode != null && ErrorCode.Equals(other.ErrorCode)) && (ConnectionId == other.ConnectionId || ConnectionId != null && ConnectionId.Equals(other.ConnectionId)) && (ConnectionClosed == other.ConnectionClosed || ConnectionClosed != null && ConnectionClosed.Equals(other.ConnectionClosed)) && (StatusCode == other.StatusCode || StatusCode != null && StatusCode.Equals(other.StatusCode))); }