/// <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 (Id != null) { hashCode = hashCode * 59 + Id.GetHashCode(); } if (CurrencyCode != null) { hashCode = hashCode * 59 + CurrencyCode.GetHashCode(); } if (Amount != null) { hashCode = hashCode * 59 + Amount.GetHashCode(); } if (CVC != null) { hashCode = hashCode * 59 + CVC.GetHashCode(); } if (CardNumber != null) { hashCode = hashCode * 59 + CardNumber.GetHashCode(); } if (FullName != null) { hashCode = hashCode * 59 + FullName.GetHashCode(); } if (CardExpiryDate != null) { hashCode = hashCode * 59 + CardExpiryDate.GetHashCode(); } if (RequestDate != null) { hashCode = hashCode * 59 + RequestDate.GetHashCode(); } if (SendingBankName != null) { hashCode = hashCode * 59 + SendingBankName.GetHashCode(); } if (RecievingBankName != null) { hashCode = hashCode * 59 + RecievingBankName.GetHashCode(); } return(hashCode); } }
public override int GetHashCode() { int hash = 99907; int secondPrime = 67619; //NO SE HACE VALIDACION DE VALORES NULOS DADO QUE LOS ATRIBUTOS SON OBLIGATORIOS hash = hash * secondPrime + AuthenticationData.GetHashCode(); hash = hash * secondPrime + DeviceType.GetHashCode(); hash = hash * secondPrime + Amount.GetHashCode(); hash = hash * secondPrime + ExternalTransactionReference.GetHashCode(); hash = hash * secondPrime + Recipient.GetHashCode(); hash = hash * secondPrime + WalletType.GetHashCode(); hash = hash * secondPrime + (RecipientAccessId == null ? 0 : RecipientAccessId.GetHashCode()); hash = hash * secondPrime + (RecipientPdv == null ? 0 : RecipientPdv.GetHashCode()); hash = hash * secondPrime + (RequestDate == null ? 0 : RequestDate.GetHashCode()); hash = hash * secondPrime + (Comment == null ? 0 : Comment.GetHashCode()); return(hash); }