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

            if (Id != 0)
            {
                hash ^= Id.GetHashCode();
            }
            if (session_ != null)
            {
                hash ^= Session.GetHashCode();
            }
            if (character_ != null)
            {
                hash ^= Character.GetHashCode();
            }
            if (requestDataCase_ == RequestDataOneofCase.Movement)
            {
                hash ^= Movement.GetHashCode();
            }
            if (requestDataCase_ == RequestDataOneofCase.Facing)
            {
                hash ^= Facing.GetHashCode();
            }
            hash ^= (int)requestDataCase_;
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Esempio n. 2
0
 // For Equals.
 public override int GetHashCode()
 {
     // We don't add Cell.GetHashCode() to avoid recursion. We also ignore actions.
     return(Facing.GetHashCode() ^ Class.GetHashCode());
 }