/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; if (AccountName != null) { hashCode = hashCode * 59 + AccountName.GetHashCode(); } if (AccountNumber != null) { hashCode = hashCode * 59 + AccountNumber.GetHashCode(); } if (SortCode != null) { hashCode = hashCode * 59 + SortCode.GetHashCode(); } if (Balance != null) { hashCode = hashCode * 59 + Balance.GetHashCode(); } if (AvailableBalance != null) { hashCode = hashCode * 59 + AvailableBalance.GetHashCode(); } if (Overdraft != null) { hashCode = hashCode * 59 + Overdraft.GetHashCode(); } return(hashCode); } }
private static bool MappingContainsSortCode(SortCode sortCode, ModulusWeightMapping rm) { var mappingStart = rm.SortCodeStart.DoubleValue; var mappingEnd = rm.SortCodeEnd.DoubleValue; var sc = sortCode.DoubleValue; return(mappingStart <= sc && sc <= mappingEnd); }
/// <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) )); }
public override bool Equals(object obj) { var bankAccount = obj as BankAccount; if (bankAccount == null) { return(false); } return(Number.Equals(bankAccount.Number) && SortCode.Equals(bankAccount.SortCode)); }
public int CompareTo(FileItem other) { // int b = "".CompareTo("a"); // int c = "Ζ".CompareTo("A"); // int d = "Ζ".CompareTo("z"); // int e = "Ζ".CompareTo("Z"); // int f = "Ζ".CompareTo("0"); // int g = "Ζ".CompareTo("9"); // // int a = SortCode.CompareTo(other.SortCode); return(SortCode.CompareTo(other.SortCode)); }
/// <summary> /// Returns true if AccountDetailsViewModel instances are equal /// </summary> /// <param name="other">Instance of AccountDetailsViewModel to be compared</param> /// <returns>Boolean</returns> public bool Equals(AccountDetailsViewModel other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( AccountId == other.AccountId || AccountId != null && AccountId.Equals(other.AccountId) ) && ( BankId == other.BankId || BankId != null && BankId.Equals(other.BankId) ) && ( AccountNumber == other.AccountNumber || AccountNumber != null && AccountNumber.Equals(other.AccountNumber) ) && ( SortCode == other.SortCode || SortCode != null && SortCode.Equals(other.SortCode) ) && ( AccountName == other.AccountName || AccountName != null && AccountName.Equals(other.AccountName) ) && ( CurrentBalance == other.CurrentBalance || CurrentBalance != null && CurrentBalance.Equals(other.CurrentBalance) ) && ( OverdraftLimit == other.OverdraftLimit || OverdraftLimit != null && OverdraftLimit.Equals(other.OverdraftLimit) )); }
/// <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); } }
public override int GetHashCode() { int hash = 1; if (TxnId.Length != 0) { hash ^= TxnId.GetHashCode(); } if (Type != 0) { hash ^= Type.GetHashCode(); } if (SortCode.Length != 0) { hash ^= SortCode.GetHashCode(); } if (Account.Length != 0) { hash ^= Account.GetHashCode(); } if (Name.Length != 0) { hash ^= Name.GetHashCode(); } if (Address.Length != 0) { hash ^= Address.GetHashCode(); } if (IsPseudo != false) { hash ^= IsPseudo.GetHashCode(); } if (IsFoundDirect != false) { hash ^= IsFoundDirect.GetHashCode(); } if (DiscoveredAccountId.Length != 0) { hash ^= DiscoveredAccountId.GetHashCode(); } hash ^= accounts_.GetHashCode(); return(hash); }
/// <summary> /// Returns true if AccountViewModel instances are equal /// </summary> /// <param name="input">Instance of AccountViewModel to be compared</param> /// <returns>Boolean</returns> public bool Equals(AccountViewModel input) { if (input == null) { return(false); } return (( AccountName == input.AccountName || AccountName != null && AccountName.Equals(input.AccountName) ) && ( AccountNumber == input.AccountNumber || AccountNumber != null && AccountNumber.Equals(input.AccountNumber) ) && ( SortCode == input.SortCode || SortCode != null && SortCode.Equals(input.SortCode) ) && ( Balance == input.Balance || Balance != null && Balance.Equals(input.Balance) ) && ( AvailableBalance == input.AvailableBalance || AvailableBalance != null && AvailableBalance.Equals(input.AvailableBalance) ) && ( Overdraft == input.Overdraft || Overdraft != null && Overdraft.Equals(input.Overdraft) )); }
/// <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 (AccountId != null) { hashCode = hashCode * 59 + AccountId.GetHashCode(); } if (BankId != null) { hashCode = hashCode * 59 + BankId.GetHashCode(); } if (AccountNumber != null) { hashCode = hashCode * 59 + AccountNumber.GetHashCode(); } if (SortCode != null) { hashCode = hashCode * 59 + SortCode.GetHashCode(); } if (AccountName != null) { hashCode = hashCode * 59 + AccountName.GetHashCode(); } if (CurrentBalance != null) { hashCode = hashCode * 59 + CurrentBalance.GetHashCode(); } if (OverdraftLimit != null) { hashCode = hashCode * 59 + OverdraftLimit.GetHashCode(); } return(hashCode); } }
public IEnumerable <ModulusWeightMapping> GetRuleMappings(SortCode sortCode) { return (RuleMappings.Where(rm => sortCode.DoubleValue >= rm.SortCodeStart.DoubleValue && sortCode.DoubleValue <= rm.SortCodeEnd.DoubleValue)); }
/// <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 (Nickname != null) { hashCode = hashCode * 59 + Nickname.GetHashCode(); } if (CurrencyId != null) { hashCode = hashCode * 59 + CurrencyId.GetHashCode(); } if (AccountHolder != null) { hashCode = hashCode * 59 + AccountHolder.GetHashCode(); } if (AccountNumber != null) { hashCode = hashCode * 59 + AccountNumber.GetHashCode(); } if (Iban != null) { hashCode = hashCode * 59 + Iban.GetHashCode(); } if (BankName != null) { hashCode = hashCode * 59 + BankName.GetHashCode(); } if (SortCode != null) { hashCode = hashCode * 59 + SortCode.GetHashCode(); } if (RoutingNumber != null) { hashCode = hashCode * 59 + RoutingNumber.GetHashCode(); } if (SwiftBic != null) { hashCode = hashCode * 59 + SwiftBic.GetHashCode(); } if (IfscCode != null) { hashCode = hashCode * 59 + IfscCode.GetHashCode(); } if (RoutingCode != null) { hashCode = hashCode * 59 + RoutingCode.GetHashCode(); } if (UserAddressId != null) { hashCode = hashCode * 59 + UserAddressId.GetHashCode(); } if (BankAddress != null) { hashCode = hashCode * 59 + BankAddress.GetHashCode(); } return(hashCode); } }
/// <summary> /// Returns true if BankInfo instances are equal /// </summary> /// <param name="other">Instance of BankInfo to be compared</param> /// <returns>Boolean</returns> public bool Equals(BankInfo other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Nickname == other.Nickname || Nickname != null && Nickname.Equals(other.Nickname) ) && ( CurrencyId == other.CurrencyId || CurrencyId != null && CurrencyId.Equals(other.CurrencyId) ) && ( AccountHolder == other.AccountHolder || AccountHolder != null && AccountHolder.Equals(other.AccountHolder) ) && ( AccountNumber == other.AccountNumber || AccountNumber != null && AccountNumber.Equals(other.AccountNumber) ) && ( Iban == other.Iban || Iban != null && Iban.Equals(other.Iban) ) && ( BankName == other.BankName || BankName != null && BankName.Equals(other.BankName) ) && ( SortCode == other.SortCode || SortCode != null && SortCode.Equals(other.SortCode) ) && ( RoutingNumber == other.RoutingNumber || RoutingNumber != null && RoutingNumber.Equals(other.RoutingNumber) ) && ( SwiftBic == other.SwiftBic || SwiftBic != null && SwiftBic.Equals(other.SwiftBic) ) && ( IfscCode == other.IfscCode || IfscCode != null && IfscCode.Equals(other.IfscCode) ) && ( RoutingCode == other.RoutingCode || RoutingCode != null && RoutingCode.Equals(other.RoutingCode) ) && ( UserAddressId == other.UserAddressId || UserAddressId != null && UserAddressId.Equals(other.UserAddressId) ) && ( BankAddress == other.BankAddress || BankAddress != null && BankAddress.Equals(other.BankAddress) )); }
public override int GetHashCode() { return(Number.GetHashCode() ^ SortCode.GetHashCode()); }
public IEnumerable <ModulusWeightMapping> GetRuleMappings(SortCode sortCode) => RuleMappings.Where(rm => MappingContainsSortCode(sortCode, rm));
void Start() { allPoints = GameObject.Find("PointsController").GetComponent <AllPoints>(); sortCode = GetComponent <SortCode>(); }