Пример #1
0
 public void MergeFrom(Notification other)
 {
     if (other == null)
     {
         return;
     }
     if (other.senderId_ != null)
     {
         if (senderId_ == null)
         {
             senderId_ = new Bgs.Protocol.EntityId();
         }
         SenderId.MergeFrom(other.SenderId);
     }
     if (other.targetId_ != null)
     {
         if (targetId_ == null)
         {
             targetId_ = new Bgs.Protocol.EntityId();
         }
         TargetId.MergeFrom(other.TargetId);
     }
     if (other.Type.Length != 0)
     {
         Type = other.Type;
     }
     attribute_.Add(other.attribute_);
     if (other.senderAccountId_ != null)
     {
         if (senderAccountId_ == null)
         {
             senderAccountId_ = new Bgs.Protocol.EntityId();
         }
         SenderAccountId.MergeFrom(other.SenderAccountId);
     }
     if (other.targetAccountId_ != null)
     {
         if (targetAccountId_ == null)
         {
             targetAccountId_ = new Bgs.Protocol.EntityId();
         }
         TargetAccountId.MergeFrom(other.TargetAccountId);
     }
     if (other.SenderBattleTag.Length != 0)
     {
         SenderBattleTag = other.SenderBattleTag;
     }
     if (other.TargetBattleTag.Length != 0)
     {
         TargetBattleTag = other.TargetBattleTag;
     }
     if (other.peer_ != null)
     {
         if (peer_ == null)
         {
             peer_ = new Bgs.Protocol.ProcessId();
         }
         Peer.MergeFrom(other.Peer);
     }
     if (other.forwardingIdentity_ != null)
     {
         if (forwardingIdentity_ == null)
         {
             forwardingIdentity_ = new Bgs.Protocol.Account.V1.Identity();
         }
         ForwardingIdentity.MergeFrom(other.ForwardingIdentity);
     }
 }
Пример #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);
 }