コード例 #1
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Id != 0)
            {
                hash ^= Id.GetHashCode();
            }
            if (Name.Length != 0)
            {
                hash ^= Name.GetHashCode();
            }
            if (Desc.Length != 0)
            {
                hash ^= Desc.GetHashCode();
            }
            if (HeroId != 0)
            {
                hash ^= HeroId.GetHashCode();
            }
            if (IsMale != false)
            {
                hash ^= IsMale.GetHashCode();
            }
            hash ^= modelMale_.GetHashCode();
            hash ^= modelFemale_.GetHashCode();
            if (CarrerIconPath.Length != 0)
            {
                hash ^= CarrerIconPath.GetHashCode();
            }
            return(hash);
        }
コード例 #2
0
ファイル: Person.cs プロジェクト: zhenhunfan/learn
    public override int GetHashCode()
    {
        int hash = 1;

        if (Id != 0)
        {
            hash ^= Id.GetHashCode();
        }
        if (Name.Length != 0)
        {
            hash ^= Name.GetHashCode();
        }
        if (IsMale != false)
        {
            hash ^= IsMale.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::Person.Types.Gender.NotSpecified)
        {
            hash ^= Gender.GetHashCode();
        }
        if (_unknownFields != null)
        {
            hash ^= _unknownFields.GetHashCode();
        }
        return(hash);
    }