示例#1
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Ret != 0)
            {
                hash ^= Ret.GetHashCode();
            }
            if (mainVersion_ != null)
            {
                hash ^= MainVersion.GetHashCode();
            }
            if (hotVersion_ != null)
            {
                hash ^= HotVersion.GetHashCode();
            }
            hash ^= cacheVersion_.GetHashCode();
            hash ^= gameServerInfo_.GetHashCode();
            if (imgServerInfo_ != null)
            {
                hash ^= ImgServerInfo.GetHashCode();
            }
            if (reserveImgServerInfo_ != null)
            {
                hash ^= ReserveImgServerInfo.GetHashCode();
            }
            if (matchingServerInfo_ != null)
            {
                hash ^= MatchingServerInfo.GetHashCode();
            }
            hash ^= notice_.GetHashCode();
            if (switchControl_ != null)
            {
                hash ^= SwitchControl.GetHashCode();
            }
            if (DisclaimerVersion != 0)
            {
                hash ^= DisclaimerVersion.GetHashCode();
            }
            return(hash);
        }
示例#2
0
 public void MergeFrom(GameServerRes other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Ret != 0)
     {
         Ret = other.Ret;
     }
     if (other.mainVersion_ != null)
     {
         if (mainVersion_ == null)
         {
             mainVersion_ = new global::Com.Proto.Server.MainVersionPB();
         }
         MainVersion.MergeFrom(other.MainVersion);
     }
     if (other.hotVersion_ != null)
     {
         if (hotVersion_ == null)
         {
             hotVersion_ = new global::Com.Proto.Server.HotVersionPB();
         }
         HotVersion.MergeFrom(other.HotVersion);
     }
     cacheVersion_.Add(other.cacheVersion_);
     gameServerInfo_.Add(other.gameServerInfo_);
     if (other.imgServerInfo_ != null)
     {
         if (imgServerInfo_ == null)
         {
             imgServerInfo_ = new global::Com.Proto.Server.ImgServerInfoPB();
         }
         ImgServerInfo.MergeFrom(other.ImgServerInfo);
     }
     if (other.reserveImgServerInfo_ != null)
     {
         if (reserveImgServerInfo_ == null)
         {
             reserveImgServerInfo_ = new global::Com.Proto.Server.ImgServerInfoPB();
         }
         ReserveImgServerInfo.MergeFrom(other.ReserveImgServerInfo);
     }
     if (other.matchingServerInfo_ != null)
     {
         if (matchingServerInfo_ == null)
         {
             matchingServerInfo_ = new global::Com.Proto.Server.MatchingServiceInfoPB();
         }
         MatchingServerInfo.MergeFrom(other.MatchingServerInfo);
     }
     notice_.Add(other.notice_);
     if (other.switchControl_ != null)
     {
         if (switchControl_ == null)
         {
             switchControl_ = new global::Com.Proto.Server.SwitchControlPB();
         }
         SwitchControl.MergeFrom(other.SwitchControl);
     }
     if (other.DisclaimerVersion != 0)
     {
         DisclaimerVersion = other.DisclaimerVersion;
     }
 }