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

            if (HasSenderId)
            {
                hash ^= SenderId.GetHashCode();
            }
            if (HasTargetId)
            {
                hash ^= TargetId.GetHashCode();
            }
            if (HasType)
            {
                hash ^= Type.GetHashCode();
            }
            hash ^= attribute_.GetHashCode();
            if (HasSenderAccountId)
            {
                hash ^= SenderAccountId.GetHashCode();
            }
            if (HasTargetAccountId)
            {
                hash ^= TargetAccountId.GetHashCode();
            }
            if (HasSenderBattleTag)
            {
                hash ^= SenderBattleTag.GetHashCode();
            }
            if (HasTargetBattleTag)
            {
                hash ^= TargetBattleTag.GetHashCode();
            }
            if (HasPeer)
            {
                hash ^= Peer.GetHashCode();
            }
            if (HasForwardingIdentity)
            {
                hash ^= ForwardingIdentity.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
コード例 #2
0
 public void MergeFrom(Notification other)
 {
     if (other == null)
     {
         return;
     }
     if (other.HasSenderId)
     {
         if (!HasSenderId)
         {
             SenderId = new global::Bgs.Protocol.EntityId();
         }
         SenderId.MergeFrom(other.SenderId);
     }
     if (other.HasTargetId)
     {
         if (!HasTargetId)
         {
             TargetId = new global::Bgs.Protocol.EntityId();
         }
         TargetId.MergeFrom(other.TargetId);
     }
     if (other.HasType)
     {
         Type = other.Type;
     }
     attribute_.Add(other.attribute_);
     if (other.HasSenderAccountId)
     {
         if (!HasSenderAccountId)
         {
             SenderAccountId = new global::Bgs.Protocol.EntityId();
         }
         SenderAccountId.MergeFrom(other.SenderAccountId);
     }
     if (other.HasTargetAccountId)
     {
         if (!HasTargetAccountId)
         {
             TargetAccountId = new global::Bgs.Protocol.EntityId();
         }
         TargetAccountId.MergeFrom(other.TargetAccountId);
     }
     if (other.HasSenderBattleTag)
     {
         SenderBattleTag = other.SenderBattleTag;
     }
     if (other.HasTargetBattleTag)
     {
         TargetBattleTag = other.TargetBattleTag;
     }
     if (other.HasPeer)
     {
         if (!HasPeer)
         {
             Peer = new global::Bgs.Protocol.ProcessId();
         }
         Peer.MergeFrom(other.Peer);
     }
     if (other.HasForwardingIdentity)
     {
         if (!HasForwardingIdentity)
         {
             ForwardingIdentity = new global::Bgs.Protocol.Account.V1.Identity();
         }
         ForwardingIdentity.MergeFrom(other.ForwardingIdentity);
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }