예제 #1
0
파일: Person.cs 프로젝트: dorodon/Cs
 public override int GetHashCode()
 {
     unchecked
     {
         return(Name.GetHashCode() + Surname.GetHashCode() + Birthday.GetHashCode());
     }
 }
예제 #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);
        }
예제 #3
0
        public override int GetHashCode()
        {
            var hashCode = -512614078;

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

            hashCode = hashCode * -1521134295 + Birthday.GetHashCode();
            return(hashCode);
        }
예제 #4
0
        public override int GetHashCode()
        {
            int hashCode = Name.GetHashCode();

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

            return(hashCode);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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);
     }
 }
예제 #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);
     }
 }
예제 #11
0
파일: User.cs 프로젝트: Zyko0/wod-models
        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);
        }
예제 #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);
        }
예제 #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);
     }
 }
예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #17
0
 public override int GetHashCode()
 {
     return(Name.GetHashCode() ^ Surname.GetHashCode() ^ Birthday.GetHashCode());
     //return new { Name, Surname, Birthday }.GetHashCode();
     //return base.GetHashCode();
 }
예제 #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);
        }
예제 #19
0
파일: User.cs 프로젝트: Galiks/EPAM
 public override int GetHashCode()
 {
     return(Name.GetHashCode() ^ Birthday.GetHashCode() ^ Age.GetHashCode());
 }
예제 #20
0
파일: Pet.cs 프로젝트: Lengwiler/PetManager
 public override int GetHashCode()
 {
     return(Name.GetHashCode() + Breed.GetHashCode() + Birthday.GetHashCode());
 }
예제 #21
0
파일: Student.cs 프로젝트: Arasz/RestInCore
 public override int GetHashCode()
 {
     return(base.GetHashCode() + Birthday.GetHashCode() + Name.GetHashCode() + Surname.GetHashCode());
 }
예제 #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());
 }
예제 #23
0
 // чтобы уменьшить количество повторяющихся хэш-кодов
 public override int GetHashCode()
 {
     return(Name.GetHashCode() * 41 + Surname.GetHashCode() * 37 + Birthday.GetHashCode() * 31);
 }