Ejemplo n.º 1
0
Archivo: Person.cs Proyecto: dorodon/Cs
 public override int GetHashCode()
 {
     unchecked
     {
         return(Name.GetHashCode() + Surname.GetHashCode() + Birthday.GetHashCode());
     }
 }
Ejemplo n.º 2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Name.Length != 0)
            {
                hash ^= Name.GetHashCode();
            }
            if (Bol != false)
            {
                hash ^= Bol.GetHashCode();
            }
            hash ^= stringlt_.GetHashCode();
            hash ^= numberlt_.GetHashCode();
            if (birthday_ != null)
            {
                hash ^= Birthday.GetHashCode();
            }
            hash ^= results_.GetHashCode();
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Ejemplo n.º 3
0
        public override int GetHashCode()
        {
            var hashCode = -512614078;

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Name);

            hashCode = hashCode * -1521134295 + Birthday.GetHashCode();
            return(hashCode);
        }
Ejemplo n.º 4
0
        public override int GetHashCode()
        {
            int hashCode = Name.GetHashCode();

            hashCode = 31 * hashCode + Surname.GetHashCode();
            hashCode = 31 * hashCode + Birthday.GetHashCode();

            return(hashCode);
        }
Ejemplo n.º 5
0
        public override int GetHashCode()
        {
            var hashCode = -1696464566;

            hashCode = hashCode * -1521134295 + AuthorID.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Name);

            hashCode = hashCode * -1521134295 + Birthday.GetHashCode();
            return(hashCode);
        }
Ejemplo n.º 6
0
        public override int GetHashCode()
        {
            var hash = FirstName == null ? 0 : FirstName.GetHashCode();

            hash += LastName == null ? 0 : LastName.GetHashCode();
            hash += Birthday.GetHashCode();
            hash += Gender.GetHashCode();
            hash += Type.GetHashCode();
            return(hash);
        }
Ejemplo n.º 7
0
        public override int GetHashCode()
        {
            var hashCode = -1684391524;

            hashCode = hashCode * -1521134295 + Id.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Surname);

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(FirstName);

            hashCode = hashCode * -1521134295 + Birthday.GetHashCode();
            return(hashCode);
        }
Ejemplo n.º 8
0
        //Basic Hashcode and Equals methods
        public override int GetHashCode()
        {
            int hash = 5;

            hash = 83 * hash + FirstName.GetHashCode();
            hash = 83 * hash + SurName.GetHashCode();
            hash = 83 * hash + EmailAdress.GetHashCode();
            hash = 83 * hash + PhoneNumber.GetHashCode();
            hash = 83 * hash + Birthday.GetHashCode();
            hash = 83 * hash + SerialNumber;
            return(hash);
        }
Ejemplo n.º 9
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (PetName != null ? PetName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Species != null ? Species.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (PetHealth != null ? PetHealth.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Owner != null ? Owner.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ Birthday.GetHashCode();
         hashCode = (hashCode * 397) ^ PetId;
         return(hashCode);
     }
 }
Ejemplo n.º 10
0
 /// <summary>
 ///     Serves as a hash function for a particular type.
 /// </summary>
 /// <returns>
 ///     A hash code for the current <see cref="T:System.Object" />.
 /// </returns>
 public override int GetHashCode()
 {
     unchecked
     {
         int hashCode = Id;
         hashCode = (hashCode * 397) ^ (Name != null ? Name.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ Birthday.GetHashCode();
         hashCode = (hashCode * 397) ^ Time.GetHashCode();
         hashCode = (hashCode * 397) ^ AddressId;
         hashCode = (hashCode * 397) ^ (Address != null ? Address.GetHashCode() : 0);
         return(hashCode);
     }
 }
Ejemplo n.º 11
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Email.Length != 0)
            {
                hash ^= Email.GetHashCode();
            }
            if (Username.Length != 0)
            {
                hash ^= Username.GetHashCode();
            }
            if (Password.Length != 0)
            {
                hash ^= Password.GetHashCode();
            }
            if (Firstname.Length != 0)
            {
                hash ^= Firstname.GetHashCode();
            }
            if (Lastname.Length != 0)
            {
                hash ^= Lastname.GetHashCode();
            }
            if (Birthday.Length != 0)
            {
                hash ^= Birthday.GetHashCode();
            }
            if (PictureUrl.Length != 0)
            {
                hash ^= PictureUrl.GetHashCode();
            }
            if (Height != 0F)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Height);
            }
            if (Weight != 0F)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Weight);
            }
            if (AffiliatedBox.Length != 0)
            {
                hash ^= AffiliatedBox.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Ejemplo n.º 12
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Id != 0)
            {
                hash ^= Id.GetHashCode();
            }
            if (Name.Length != 0)
            {
                hash ^= Name.GetHashCode();
            }
            if (Height != 0F)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Height);
            }
            if (Weight != 0F)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Weight);
            }
            if (Avator.Length != 0)
            {
                hash ^= Avator.GetHashCode();
            }
            if (Email.Length != 0)
            {
                hash ^= Email.GetHashCode();
            }
            if (EmailVerified != false)
            {
                hash ^= EmailVerified.GetHashCode();
            }
            hash ^= phoneNumber_.GetHashCode();
            if (Gender != global::My.Project.Gender.NotSpecified)
            {
                hash ^= Gender.GetHashCode();
            }
            if (birthday_ != null)
            {
                hash ^= Birthday.GetHashCode();
            }
            hash ^= addresses_.GetHashCode();
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Ejemplo n.º 13
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = base.GetHashCode();
         hashCode = (hashCode * 397) ^ CreateTime.GetHashCode();
         hashCode = (hashCode * 397) ^ ModifyTime.GetHashCode();
         hashCode = (hashCode * 397) ^ (Photo != null ? Photo.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (FirstName != null ? FirstName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (LastName != null ? LastName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Nickname != null ? Nickname.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ Birthday.GetHashCode();
         hashCode = (hashCode * 397) ^ (Email != null ? Email.GetHashCode() : 0);
         return(hashCode);
     }
 }
Ejemplo n.º 14
0
        public override int GetHashCode()
        {
            int hashCode = 1327366762;

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Name);

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Surname);

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Phone);

            hashCode = hashCode * -1521134295 + Gender.GetHashCode();
            hashCode = hashCode * -1521134295 + Birthday.GetHashCode();
            hashCode = hashCode * -1521134295 + Age.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(FullName);

            return(hashCode);
        }
Ejemplo n.º 15
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (UserId != 0)
            {
                hash ^= UserId.GetHashCode();
            }
            if (AccountId.Length != 0)
            {
                hash ^= AccountId.GetHashCode();
            }
            if (ChannelAccountId.Length != 0)
            {
                hash ^= ChannelAccountId.GetHashCode();
            }
            if (UserName.Length != 0)
            {
                hash ^= UserName.GetHashCode();
            }
            if (Logo.Length != 0)
            {
                hash ^= Logo.GetHashCode();
            }
            if (Index != 0)
            {
                hash ^= Index.GetHashCode();
            }
            if (CardGatherNum != 0)
            {
                hash ^= CardGatherNum.GetHashCode();
            }
            hash ^= Apparel.GetHashCode();
            if (CreateTime != 0L)
            {
                hash ^= CreateTime.GetHashCode();
            }
            hash ^= Birthday.GetHashCode();
            if (userOther_ != null)
            {
                hash ^= UserOther.GetHashCode();
            }
            return(hash);
        }
Ejemplo n.º 16
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Id != 0)
            {
                hash ^= Id.GetHashCode();
            }
            if (FirstName.Length != 0)
            {
                hash ^= FirstName.GetHashCode();
            }
            if (LastName.Length != 0)
            {
                hash ^= LastName.GetHashCode();
            }
            if (Birthday != 0L)
            {
                hash ^= Birthday.GetHashCode();
            }
            hash ^= vehicles_.GetHashCode();
            return(hash);
        }
Ejemplo n.º 17
0
 public override int GetHashCode()
 {
     return(Name.GetHashCode() ^ Surname.GetHashCode() ^ Birthday.GetHashCode());
     //return new { Name, Surname, Birthday }.GetHashCode();
     //return base.GetHashCode();
 }
Ejemplo n.º 18
0
        public override int GetHashCode()
        {
            int hashCode = 749289117;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            return(hashCode);
        }
Ejemplo n.º 19
0
Archivo: User.cs Proyecto: Galiks/EPAM
 public override int GetHashCode()
 {
     return(Name.GetHashCode() ^ Birthday.GetHashCode() ^ Age.GetHashCode());
 }
Ejemplo n.º 20
0
 public override int GetHashCode()
 {
     return(Name.GetHashCode() + Breed.GetHashCode() + Birthday.GetHashCode());
 }
Ejemplo n.º 21
0
 public override int GetHashCode()
 {
     return(base.GetHashCode() + Birthday.GetHashCode() + Name.GetHashCode() + Surname.GetHashCode());
 }
Ejemplo n.º 22
0
 // You must override this in conjunction with overriding Equals (above) if you want .NET collections (HashSet, List, etc.) to properly compare Person objects.
 public override int GetHashCode()
 {
     return(Name.GetHashCode() ^ Birthday.GetHashCode() ^ HeightInMillimeters.GetHashCode() ^ Gendrality.GetHashCode());
 }
Ejemplo n.º 23
0
 // чтобы уменьшить количество повторяющихся хэш-кодов
 public override int GetHashCode()
 {
     return(Name.GetHashCode() * 41 + Surname.GetHashCode() * 37 + Birthday.GetHashCode() * 31);
 }