/// <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(); } if (Fee != null) { hashCode = hashCode * 59 + Fee.GetHashCode(); } if (ConfirmedTimestamp != null) { hashCode = hashCode * 59 + ConfirmedTimestamp.GetHashCode(); } if (Amount != null) { hashCode = hashCode * 59 + Amount.GetHashCode(); } if (Priority != null) { hashCode = hashCode * 59 + Priority.GetHashCode(); } hashCode = hashCode * 59 + Currency.GetHashCode(); hashCode = hashCode * 59 + State.GetHashCode(); if (Address != null) { hashCode = hashCode * 59 + Address.GetHashCode(); } if (CreatedTimestamp != null) { hashCode = hashCode * 59 + CreatedTimestamp.GetHashCode(); } if (Id != null) { hashCode = hashCode * 59 + Id.GetHashCode(); } if (TransactionId != null) { hashCode = hashCode * 59 + TransactionId.GetHashCode(); } return(hashCode); } }
/// <summary> /// Returns true if Withdrawal instances are equal /// </summary> /// <param name="other">Instance of Withdrawal to be compared</param> /// <returns>Boolean</returns> public bool Equals(Withdrawal other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( UpdatedTimestamp == other.UpdatedTimestamp || UpdatedTimestamp != null && UpdatedTimestamp.Equals(other.UpdatedTimestamp) ) && ( Fee == other.Fee || Fee != null && Fee.Equals(other.Fee) ) && ( ConfirmedTimestamp == other.ConfirmedTimestamp || ConfirmedTimestamp != null && ConfirmedTimestamp.Equals(other.ConfirmedTimestamp) ) && ( Amount == other.Amount || Amount != null && Amount.Equals(other.Amount) ) && ( Priority == other.Priority || Priority != null && Priority.Equals(other.Priority) ) && ( Currency == other.Currency || Currency.Equals(other.Currency) ) && ( State == other.State || State.Equals(other.State) ) && ( Address == other.Address || Address != null && Address.Equals(other.Address) ) && ( CreatedTimestamp == other.CreatedTimestamp || CreatedTimestamp != null && CreatedTimestamp.Equals(other.CreatedTimestamp) ) && ( Id == other.Id || Id != null && Id.Equals(other.Id) ) && ( TransactionId == other.TransactionId || TransactionId != null && TransactionId.Equals(other.TransactionId) )); }