/// <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 (CardholderName != null)
         {
             hashCode = hashCode * 59 + CardholderName.GetHashCode();
         }
         if (Cryptogram != null)
         {
             hashCode = hashCode * 59 + Cryptogram.GetHashCode();
         }
         if (Dpan != null)
         {
             hashCode = hashCode * 59 + Dpan.GetHashCode();
         }
         if (Eci != null)
         {
             hashCode = hashCode * 59 + Eci.GetHashCode();
         }
         if (ExpiryDate != null)
         {
             hashCode = hashCode * 59 + ExpiryDate.GetHashCode();
         }
         return(hashCode);
     }
 }
Example #2
0
        public override int GetHashCode()
        {
            int hashCode = 1509386817;

            if (CardNonce != null)
            {
                hashCode += CardNonce.GetHashCode();
            }

            if (BillingAddress != null)
            {
                hashCode += BillingAddress.GetHashCode();
            }

            if (CardholderName != null)
            {
                hashCode += CardholderName.GetHashCode();
            }

            if (VerificationToken != null)
            {
                hashCode += VerificationToken.GetHashCode();
            }

            return(hashCode);
        }
Example #3
0
        public virtual int _GetUniqueIdentifier()
        {
            var hashCode = 399326290;

            hashCode = hashCode * -1521134295 + (Id?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (PaymentMethod?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (CardholderName?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (CardNumber?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (CCV?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (ExpirationMonth?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (ExpirationYear?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (IBANNumber?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (BankName?.GetHashCode() ?? 0);
            return(hashCode);
        }
Example #4
0
 /// <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 (CardholderName != null)
         {
             hashCode = hashCode * 59 + CardholderName.GetHashCode();
         }
         if (IssueNumber != null)
         {
             hashCode = hashCode * 59 + IssueNumber.GetHashCode();
         }
         return(hashCode);
     }
 }
Example #5
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (CardNumber.Length != 0)
            {
                hash ^= CardNumber.GetHashCode();
            }
            if (Cvc.Length != 0)
            {
                hash ^= Cvc.GetHashCode();
            }
            if (ExpiryMonth != 0)
            {
                hash ^= ExpiryMonth.GetHashCode();
            }
            if (FourDigitExpiryYear != 0)
            {
                hash ^= FourDigitExpiryYear.GetHashCode();
            }
            if (Zipcode.Length != 0)
            {
                hash ^= Zipcode.GetHashCode();
            }
            if (CardholderName.Length != 0)
            {
                hash ^= CardholderName.GetHashCode();
            }
            if (IsVirtualCard != false)
            {
                hash ^= IsVirtualCard.GetHashCode();
            }
            if (virtualCardLimit_ != null)
            {
                hash ^= VirtualCardLimit.GetHashCode();
            }
            if (virtualCardAvailableOn_ != null)
            {
                hash ^= VirtualCardAvailableOn.GetHashCode();
            }
            if (virtualCardExpiresOn_ != null)
            {
                hash ^= VirtualCardExpiresOn.GetHashCode();
            }
            return(hash);
        }
Example #6
0
        public override int GetHashCode()
        {
            int hashCode = 1370361237;

            if (Id != null)
            {
                hashCode += Id.GetHashCode();
            }

            if (CardBrand != null)
            {
                hashCode += CardBrand.GetHashCode();
            }

            if (Last4 != null)
            {
                hashCode += Last4.GetHashCode();
            }

            if (ExpMonth != null)
            {
                hashCode += ExpMonth.GetHashCode();
            }

            if (ExpYear != null)
            {
                hashCode += ExpYear.GetHashCode();
            }

            if (CardholderName != null)
            {
                hashCode += CardholderName.GetHashCode();
            }

            if (BillingAddress != null)
            {
                hashCode += BillingAddress.GetHashCode();
            }

            if (Fingerprint != null)
            {
                hashCode += Fingerprint.GetHashCode();
            }

            if (CardType != null)
            {
                hashCode += CardType.GetHashCode();
            }

            if (PrepaidType != null)
            {
                hashCode += PrepaidType.GetHashCode();
            }

            if (Bin != null)
            {
                hashCode += Bin.GetHashCode();
            }

            return(hashCode);
        }