/// <summary> /// Returns true if PersonalInfo instances are equal /// </summary> /// <param name="other">Instance of PersonalInfo to be compared</param> /// <returns>Boolean</returns> public bool Equals(PersonalInfo other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( MaidenName == other.MaidenName || MaidenName != null && MaidenName.Equals(other.MaidenName) ) && ( MaritalStatus == other.MaritalStatus || MaritalStatus != null && MaritalStatus.Equals(other.MaritalStatus) ) && ( AdditionalID == other.AdditionalID || AdditionalID != null && AdditionalID.Equals(other.AdditionalID) ) && ( PlaceOfBirth == other.PlaceOfBirth || PlaceOfBirth != null && PlaceOfBirth.Equals(other.PlaceOfBirth) ) && ( Nationality == other.Nationality || Nationality != null && Nationality.Equals(other.Nationality) ) && ( EthnicOrigin == other.EthnicOrigin || EthnicOrigin != null && EthnicOrigin.Equals(other.EthnicOrigin) ) && ( VisaRequired == other.VisaRequired || VisaRequired != null && VisaRequired.Equals(other.VisaRequired) ) && ( DisabledNo == other.DisabledNo || DisabledNo != null && DisabledNo.Equals(other.DisabledNo) ) && ( Disability == other.Disability || Disability != null && Disability.Equals(other.Disability) )); }
/// <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 (MaidenName != null) { hashCode = hashCode * 59 + MaidenName.GetHashCode(); } if (MaritalStatus != null) { hashCode = hashCode * 59 + MaritalStatus.GetHashCode(); } if (AdditionalID != null) { hashCode = hashCode * 59 + AdditionalID.GetHashCode(); } if (PlaceOfBirth != null) { hashCode = hashCode * 59 + PlaceOfBirth.GetHashCode(); } if (Nationality != null) { hashCode = hashCode * 59 + Nationality.GetHashCode(); } if (EthnicOrigin != null) { hashCode = hashCode * 59 + EthnicOrigin.GetHashCode(); } if (VisaRequired != null) { hashCode = hashCode * 59 + VisaRequired.GetHashCode(); } if (DisabledNo != null) { hashCode = hashCode * 59 + DisabledNo.GetHashCode(); } if (Disability != null) { hashCode = hashCode * 59 + Disability.GetHashCode(); } return(hashCode); } }
private UploadAppSampleDataDictionary GetSampleData() { var r = new UploadAppSampleDataDictionary { ApplicationType = ApplicationType.XKeys(), CreditTermAsked = new[] { CreditTermAskedFrom.Text.Toi(), CreditTermAskedTo.Text.Toi() }, DepositTermAsked = new[] { DepositTermAskedFrom.Text.Toi(), DepositTermAskedTo.Text.Toi() }, CreditLimitAsked = new[] { CreditLimitAskedFrom.Text.Toi(), CreditLimitAskedTo.Text.Toi() }, DepositLimitAsked = new[] { DepositLimitAskedFrom.Text.Toi(), DepositLimitAskedTo.Text.Toi() }, CardCategory = CardCategory.XKeys(), PaternalNameM = PaternalNameM.XVals(), NameM = NameM.XVals(), LastNameM = LastNameM.XVals(), PaternalNameG = PaternalNameG.XVals(), NameG = NameG.XVals(), LastNameG = LastNameG.XVals(), IsSecondNameNOTChanged = IsSecondNameNOTChanged.XKeys(), PreviousSecondName = PreviousSecondName.XVals(), PlaceOfBirth = PlaceOfBirth.XVals(), BirthDate = new[] { BirthDateFrom.Value, BirthDateTo.Value }, Gender = Gender.XKeys(), IssuedOn = new[] { IssuedOnFrom.Value, IssuedOnTo.Value }, IssuePlace = IssuePlace.XVals(), IssuedBy = IssuedBy.XVals(), LineCodeKLADR = LineCodeKLADR.XKeys(), Building = new[] { BuildingFrom.Text.Toi(), BuildingTo.Text.Toi() }, DeliveryAddress = DeliveryAddress.XKeys(), AccountName = AccountName.XVals(), AccountType = AccountType.XKeys(), LaborContractType = LaborContractType.XKeys(), TotalWorkExperience = TotalWorkExperience.XKeys(), LastSeniority = LastSeniority.XKeys(), JobTitle = JobTitle.XKeys(), AverageMonthlyIncome = new[] { AverageMonthlyIncomeFrom.Text.Toi(), AverageMonthlyIncomeTo.Text.Toi() }, IncomeCheckStatus = IncomeCheckStatus.XKeys(), DeliveryAddressV = DeliveryAddressV.XKeys(), Education = Education.XKeys(), MaritalStatus = MaritalStatus.XKeys(), MinorChildrenNummber = MinorChildrenNummber.XKeys(), ContactName = ContactName.XVals(), RelationDegree = RelationDegree.XKeys(), IsNotPublicPerson = IsNotPublicPerson.XKeys(), MaidenName = MaidenName.XVals(), SecretQuestion = SecretQuestion.XKeys(), PreviousCreditsQuantity = PreviousCreditsQuantity.XKeys(), AccountSphere = AccountSphere.XKeys(), AccountCompanyEmployeesQty = AccountCompanyEmployeesQty.XVals(), SecretWord = SecretWord.XVals(), BankingServiceCredit = BankingServiceCredit.XKeys(), BankingServiceDebit = BankingServiceDebit.XKeys(), CurrencyAsked = CurrencyAsked.XKeys(), IsAgreeAuthorityTransfer = IsAgreeAuthorityTransfer.XKeys(), IsDataAuthentic = IsDataAuthentic.XKeys(), Street = Street.XVals(), PercentPayment = PercentPayment.XVals(), PercentPaymentMethod = PercentPaymentMethod.XVals(), DependentsNumber = DependantsNumber.XKeys(), EarlierCreditStatuse = EarlierCreditStatuse.XKeys(), EarlierCreditType = EarlierCreditType.XKeys(), EarlierBank = EarlierBank.XKeys(), EarlierMaxLoanTerm = EarlierMaxLoanTerm.XKeys(), ClientType = ClientType.XKeys(), }; return(r); }