/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; // Suitable nullity checks etc, of course :) if (UpdatedTimestamp != null) { hashCode = hashCode * 59 + UpdatedTimestamp.GetHashCode(); } hashCode = hashCode * 59 + State.GetHashCode(); if (ReceivedTimestamp != null) { hashCode = hashCode * 59 + ReceivedTimestamp.GetHashCode(); } hashCode = hashCode * 59 + Currency.GetHashCode(); if (Address != null) { hashCode = hashCode * 59 + Address.GetHashCode(); } if (Amount != null) { hashCode = hashCode * 59 + Amount.GetHashCode(); } if (TransactionId != null) { hashCode = hashCode * 59 + TransactionId.GetHashCode(); } return(hashCode); } }
/// <summary> /// Returns true if Deposit instances are equal /// </summary> /// <param name="other">Instance of Deposit to be compared</param> /// <returns>Boolean</returns> public bool Equals(Deposit other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( UpdatedTimestamp == other.UpdatedTimestamp || UpdatedTimestamp != null && UpdatedTimestamp.Equals(other.UpdatedTimestamp) ) && ( State == other.State || State.Equals(other.State) ) && ( ReceivedTimestamp == other.ReceivedTimestamp || ReceivedTimestamp != null && ReceivedTimestamp.Equals(other.ReceivedTimestamp) ) && ( Currency == other.Currency || Currency.Equals(other.Currency) ) && ( Address == other.Address || Address != null && Address.Equals(other.Address) ) && ( Amount == other.Amount || Amount != null && Amount.Equals(other.Amount) ) && ( TransactionId == other.TransactionId || TransactionId != null && TransactionId.Equals(other.TransactionId) )); }