예제 #1
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

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

                case 10: {
                    if (header_ == null)
                    {
                        header_ = new global::TesteProtobuf.Protos.MeuCabecalho();
                    }
                    input.ReadMessage(header_);
                    break;
                }

                case 18: {
                    if (data_ == null)
                    {
                        data_ = new global::TesteProtobuf.Protos.MeusDados();
                    }
                    input.ReadMessage(data_);
                    break;
                }
                }
            }
        }
예제 #2
0
 public void MergeFrom(MeuPacote other)
 {
     if (other == null)
     {
         return;
     }
     if (other.header_ != null)
     {
         if (header_ == null)
         {
             header_ = new global::TesteProtobuf.Protos.MeuCabecalho();
         }
         Header.MergeFrom(other.Header);
     }
     if (other.data_ != null)
     {
         if (data_ == null)
         {
             data_ = new global::TesteProtobuf.Protos.MeusDados();
         }
         Data.MergeFrom(other.Data);
     }
 }