Esempio n. 1
0
 public bool ValidateChipNumber()
 {
     if (ChipNumber.ToString().Length != 9)
     {
         return(false);
     }
     return(true);
 }
Esempio n. 2
0
        /// <summary>
        /// Returns true if BankingInternationalPayeeBankDetails instances are equal
        /// </summary>
        /// <param name="other">Instance of BankingInternationalPayeeBankDetails to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(BankingInternationalPayeeBankDetails other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Country == other.Country ||
                     Country != null &&
                     Country.Equals(other.Country)
                     ) &&
                 (
                     AccountNumber == other.AccountNumber ||
                     AccountNumber != null &&
                     AccountNumber.Equals(other.AccountNumber)
                 ) &&
                 (
                     BankAddress == other.BankAddress ||
                     BankAddress != null &&
                     BankAddress.Equals(other.BankAddress)
                 ) &&
                 (
                     BeneficiaryBankBIC == other.BeneficiaryBankBIC ||
                     BeneficiaryBankBIC != null &&
                     BeneficiaryBankBIC.Equals(other.BeneficiaryBankBIC)
                 ) &&
                 (
                     FedWireNumber == other.FedWireNumber ||
                     FedWireNumber != null &&
                     FedWireNumber.Equals(other.FedWireNumber)
                 ) &&
                 (
                     SortCode == other.SortCode ||
                     SortCode != null &&
                     SortCode.Equals(other.SortCode)
                 ) &&
                 (
                     ChipNumber == other.ChipNumber ||
                     ChipNumber != null &&
                     ChipNumber.Equals(other.ChipNumber)
                 ) &&
                 (
                     RoutingNumber == other.RoutingNumber ||
                     RoutingNumber != null &&
                     RoutingNumber.Equals(other.RoutingNumber)
                 ) &&
                 (
                     LegalEntityIdentifier == other.LegalEntityIdentifier ||
                     LegalEntityIdentifier != null &&
                     LegalEntityIdentifier.Equals(other.LegalEntityIdentifier)
                 ));
        }
Esempio n. 3
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 (Country != null)
         {
             hashCode = hashCode * 59 + Country.GetHashCode();
         }
         if (AccountNumber != null)
         {
             hashCode = hashCode * 59 + AccountNumber.GetHashCode();
         }
         if (BankAddress != null)
         {
             hashCode = hashCode * 59 + BankAddress.GetHashCode();
         }
         if (BeneficiaryBankBIC != null)
         {
             hashCode = hashCode * 59 + BeneficiaryBankBIC.GetHashCode();
         }
         if (FedWireNumber != null)
         {
             hashCode = hashCode * 59 + FedWireNumber.GetHashCode();
         }
         if (SortCode != null)
         {
             hashCode = hashCode * 59 + SortCode.GetHashCode();
         }
         if (ChipNumber != null)
         {
             hashCode = hashCode * 59 + ChipNumber.GetHashCode();
         }
         if (RoutingNumber != null)
         {
             hashCode = hashCode * 59 + RoutingNumber.GetHashCode();
         }
         if (LegalEntityIdentifier != null)
         {
             hashCode = hashCode * 59 + LegalEntityIdentifier.GetHashCode();
         }
         return(hashCode);
     }
 }