Ejemplo n.º 1
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 (FirstName != null)
         {
             hashCode = hashCode * 59 + FirstName.GetHashCode();
         }
         if (LastName != null)
         {
             hashCode = hashCode * 59 + LastName.GetHashCode();
         }
         if (DateOfBirth != null)
         {
             hashCode = hashCode * 59 + DateOfBirth.GetHashCode();
         }
         if (PlaceOfBirth != null)
         {
             hashCode = hashCode * 59 + PlaceOfBirth.GetHashCode();
         }
         if (NationalIdNumber != null)
         {
             hashCode = hashCode * 59 + NationalIdNumber.GetHashCode();
         }
         if (NationalIdType != null)
         {
             hashCode = hashCode * 59 + NationalIdType.GetHashCode();
         }
         return(hashCode);
     }
 }
Ejemplo n.º 2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Name.Length != 0)
            {
                hash ^= Name.GetHashCode();
            }
            if (Vaan.Length != 0)
            {
                hash ^= Vaan.GetHashCode();
            }
            if (postalAddress_ != null)
            {
                hash ^= PostalAddress.GetHashCode();
            }
            if (placeOfBirth_ != null)
            {
                hash ^= PlaceOfBirth.GetHashCode();
            }
            hash ^= naturalPersonId_.GetHashCode();
            hash ^= juridicalPersonId_.GetHashCode();
            if (Bic.Length != 0)
            {
                hash ^= Bic.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Ejemplo n.º 3
0
        public override int GetHashCode()
        {
            int result = 1;

            result = (result * 397) ^ (AltEmailAddress != null ? AltEmailAddress.GetHashCode() : 0);
            result = (result * 397) ^ (AltTelephoneContact != null ? AltTelephoneContact.GetHashCode() : 0);
            result = (result * 397) ^ (CreatedOn != null ? CreatedOn.GetHashCode() : 0);
            result = (result * 397) ^ (DateOfBirth != null ? DateOfBirth.GetHashCode() : 0);
            result = (result * 397) ^ (EmailAddress != null ? EmailAddress.GetHashCode() : 0);
            result = (result * 397) ^ (Gender != null ? Gender.GetHashCode() : 0);
            result = (result * 397) ^ (GivenName != null ? GivenName.GetHashCode() : 0);
            result = (result * 397) ^ (HomeLanguage != null ? HomeLanguage.GetHashCode() : 0);
            result = (result * 397) ^ Id.GetHashCode();
            result = (result * 397) ^ (LastModified != null ? LastModified.GetHashCode() : 0);
            result = (result * 397) ^ (MaritalStatus != null ? MaritalStatus.GetHashCode() : 0);
            result = (result * 397) ^ (NextOfKinAddress != null ? NextOfKinAddress.GetHashCode() : 0);
            result = (result * 397) ^ (NextOfKinContact != null ? NextOfKinContact.GetHashCode() : 0);
            result = (result * 397) ^ (NextOfKinName != null ? NextOfKinName.GetHashCode() : 0);
            result = (result * 397) ^ (NextOfKinRelationship != null ? NextOfKinRelationship.GetHashCode() : 0);
            result = (result * 397) ^ (Occupation != null ? Occupation.GetHashCode() : 0);
            result = (result * 397) ^ (Organisation != null ? Organisation.GetHashCode() : 0);
            result = (result * 397) ^ (OtherName != null ? OtherName.GetHashCode() : 0);
            result = (result * 397) ^ (PermentAddress != null ? PermentAddress.GetHashCode() : 0);
            result = (result * 397) ^ (PersonOwnerType != null ? PersonOwnerType.GetHashCode() : 0);
            result = (result * 397) ^ (PlaceOfBirth != null ? PlaceOfBirth.GetHashCode() : 0);
            result = (result * 397) ^ (PostalAddress != null ? PostalAddress.GetHashCode() : 0);
            result = (result * 397) ^ (PreferredLanguage != null ? PreferredLanguage.GetHashCode() : 0);
            result = (result * 397) ^ (ProfilePhotoName != null ? ProfilePhotoName.GetHashCode() : 0);
            result = (result * 397) ^ (Religion != null ? Religion.GetHashCode() : 0);
            result = (result * 397) ^ (Surname != null ? Surname.GetHashCode() : 0);
            result = (result * 397) ^ (TelephoneContact != null ? TelephoneContact.GetHashCode() : 0);
            result = (result * 397) ^ (Title != null ? Title.GetHashCode() : 0);
            result = (result * 397) ^ (WebsiteUrl != null ? WebsiteUrl.GetHashCode() : 0);
            return(result);
        }
Ejemplo n.º 4
0
 public override int GetHashCode()
 {
     unchecked {
         const int randomPrime = 397;
         int       hashCode    = Id.GetHashCode();
         hashCode = (hashCode * randomPrime) ^ (AuthorName != null ? AuthorName.GetHashCode() : 0);
         hashCode = (hashCode * randomPrime) ^ (AuthorFamilyName != null ? AuthorFamilyName.GetHashCode() : 0);
         hashCode = (hashCode * randomPrime) ^ (DateOfBirth != null ? DateOfBirth.GetHashCode() : 0);
         hashCode = (hashCode * randomPrime) ^ (PlaceOfBirth != null ? PlaceOfBirth.GetHashCode() : 0);
         hashCode = (hashCode * randomPrime) ^ (SharingDate != null ? SharingDate.GetHashCode() : 0);
         hashCode = (hashCode * randomPrime) ^ (TimeInterval != null ? TimeInterval.GetHashCode() : 0);
         hashCode = (hashCode * randomPrime) ^ (TypeOfInformation != null ? TypeOfInformation.GetHashCode() : 0);
         hashCode = (hashCode * randomPrime) ^ (Language != null ? Language.GetHashCode() : 0);
         return(hashCode);
     }
 }
Ejemplo n.º 5
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 (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);
     }
 }
Ejemplo n.º 6
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 (Id != null)
         {
             hashCode = hashCode * 59 + Id.GetHashCode();
         }
         if (Title != null)
         {
             hashCode = hashCode * 59 + Title.GetHashCode();
         }
         if (GivenName != null)
         {
             hashCode = hashCode * 59 + GivenName.GetHashCode();
         }
         if (FamilyName != null)
         {
             hashCode = hashCode * 59 + FamilyName.GetHashCode();
         }
         if (MiddleName != null)
         {
             hashCode = hashCode * 59 + MiddleName.GetHashCode();
         }
         if (Href != null)
         {
             hashCode = hashCode * 59 + Href.GetHashCode();
         }
         if (Gender != null)
         {
             hashCode = hashCode * 59 + Gender.GetHashCode();
         }
         if (PlaceOfBirth != null)
         {
             hashCode = hashCode * 59 + PlaceOfBirth.GetHashCode();
         }
         if (CountryOfBirth != null)
         {
             hashCode = hashCode * 59 + CountryOfBirth.GetHashCode();
         }
         if (Nationality != null)
         {
             hashCode = hashCode * 59 + Nationality.GetHashCode();
         }
         if (MaritalStatus != null)
         {
             hashCode = hashCode * 59 + MaritalStatus.GetHashCode();
         }
         if (BirthDate != null)
         {
             hashCode = hashCode * 59 + BirthDate.GetHashCode();
         }
         if (FullName != null)
         {
             hashCode = hashCode * 59 + FullName.GetHashCode();
         }
         if (FormattedName != null)
         {
             hashCode = hashCode * 59 + FormattedName.GetHashCode();
         }
         if (Location != null)
         {
             hashCode = hashCode * 59 + Location.GetHashCode();
         }
         if (Status != null)
         {
             hashCode = hashCode * 59 + Status.GetHashCode();
         }
         return(hashCode);
     }
 }
Ejemplo n.º 7
0
 //public override int GetHashCode()     //как бы перегружаем метод GetHashCode()
 public int GetHashCode1()
 {
     return(SurnameName.GetHashCode() + DateOfBirth.GetHashCode() + PlaceOfBirth.GetHashCode() + Passport.GetHashCode());
 }