Exemplo n.º 1
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (FirstName.Length != 0)
            {
                hash ^= FirstName.GetHashCode();
            }
            if (LastName.Length != 0)
            {
                hash ^= LastName.GetHashCode();
            }
            if (EmailAddress.Length != 0)
            {
                hash ^= EmailAddress.GetHashCode();
            }
            if (IsAlive != false)
            {
                hash ^= IsAlive.GetHashCode();
            }
            if (Age != 0)
            {
                hash ^= Age.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Exemplo n.º 2
0
 public override int GetHashCode()
 {
     return(FirstName.GetHashCode()
            ^ LastName.GetHashCode()
            ^ Age.GetHashCode()
            ^ IsAlive.GetHashCode());
 }
Exemplo n.º 3
0
    public override int GetHashCode()
    {
        int hash = 1;

        if (IsAlive != false)
        {
            hash ^= IsAlive.GetHashCode();
        }
        if (FoodX != 0F)
        {
            hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(FoodX);
        }
        if (FoodZ != 0F)
        {
            hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(FoodZ);
        }
        if (Hp != 0F)
        {
            hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Hp);
        }
        if (Satiety != 0F)
        {
            hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Satiety);
        }
        if (Reward != 0F)
        {
            hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Reward);
        }
        if (_unknownFields != null)
        {
            hash ^= _unknownFields.GetHashCode();
        }
        return(hash);
    }
Exemplo n.º 4
0
    // Override GetHashCode().
    public override int GetHashCode()
    {
        int hashIsAlive  = IsAlive.GetHashCode();
        int hashIdetifer = Id.GetHashCode();

        return(hashIsAlive ^ hashIdetifer);
    }
Exemplo n.º 5
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = IsAlive.GetHashCode();
         hashCode = (hashCode * 397) ^ Y;
         hashCode = (hashCode * 397) ^ X;
         return(hashCode);
     }
 }
Exemplo n.º 6
0
 public override int GetHashCode()
 {
     unchecked
     {
         int hash = base.GetHashCode();
         hash = hash * 37 + Key.GetHashCode();
         hash = hash * 37 + (Url != null ? Url.GetHashCode() : 0);
         hash = hash * 37 + IsAlive.GetHashCode();
         hash = hash * 37 + State.GetHashCode();
         hash = hash * 37 + (Error != null ? Error.GetHashCode() : 0);
         return(hash);
     }
 }