Пример #1
0
 public void MergeFrom(TryMsg other)
 {
     if (other == null)
     {
         return;
     }
     if (other.IntVal != 0)
     {
         IntVal = other.IntVal;
     }
     if (other.StrVal.Length != 0)
     {
         StrVal = other.StrVal;
     }
     if (other.msgVal_ != null)
     {
         if (msgVal_ == null)
         {
             msgVal_ = new global::NetProto.TryItem();
         }
         MsgVal.MergeFrom(other.MsgVal);
     }
     if (other.EnumVal != 0)
     {
         EnumVal = other.EnumVal;
     }
     if (other.NestEnumVal != 0)
     {
         NestEnumVal = other.NestEnumVal;
     }
     msgArray_.Add(other.msgArray_);
     nestEnumArray_.Add(other.nestEnumArray_);
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
Пример #2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (IntVal != 0)
            {
                hash ^= IntVal.GetHashCode();
            }
            if (StrVal.Length != 0)
            {
                hash ^= StrVal.GetHashCode();
            }
            if (msgVal_ != null)
            {
                hash ^= MsgVal.GetHashCode();
            }
            if (EnumVal != 0)
            {
                hash ^= EnumVal.GetHashCode();
            }
            if (NestEnumVal != 0)
            {
                hash ^= NestEnumVal.GetHashCode();
            }
            hash ^= msgArray_.GetHashCode();
            hash ^= nestEnumArray_.GetHashCode();
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }