Пример #1
0
 public void MergeFrom(RegistroServico other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Host.Length != 0)
     {
         Host = other.Host;
     }
     if (other.Porta != 0)
     {
         Porta = other.Porta;
     }
     if (other.Servico.Length != 0)
     {
         Servico = other.Servico;
     }
     if (other.estado_ != null)
     {
         if (estado_ == null)
         {
             estado_ = new global::ServidorNomes.Estado();
         }
         Estado.MergeFrom(other.Estado);
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
Пример #2
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
                    break;

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

                case 16: {
                    Porta = input.ReadInt32();
                    break;
                }

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

                case 34: {
                    if (estado_ == null)
                    {
                        estado_ = new global::ServidorNomes.Estado();
                    }
                    input.ReadMessage(estado_);
                    break;
                }
                }
            }
        }