예제 #1
0
 public void MergeFrom(PersistentMessage other)
 {
     if (other == null)
     {
         return;
     }
     if (other.PersistenceId.Length != 0)
     {
         PersistenceId = other.PersistenceId;
     }
     if (other.SequenceNr != 0L)
     {
         SequenceNr = other.SequenceNr;
     }
     if (other.WriterGuid.Length != 0)
     {
         WriterGuid = other.WriterGuid;
     }
     if (other.payload_ != null)
     {
         if (payload_ == null)
         {
             payload_ = new global::CustomSerialization.Protobuf.Msg.PersistentPayload();
         }
         Payload.MergeFrom(other.Payload);
     }
 }
예제 #2
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    input.SkipLastField();
                    break;

                case 10: {
                    PersistenceId = input.ReadString();
                    break;
                }

                case 16: {
                    SequenceNr = input.ReadInt64();
                    break;
                }

                case 26: {
                    WriterGuid = input.ReadString();
                    break;
                }

                case 34: {
                    if (payload_ == null)
                    {
                        payload_ = new global::CustomSerialization.Protobuf.Msg.PersistentPayload();
                    }
                    input.ReadMessage(payload_);
                    break;
                }
                }
            }
        }