Ejemplo n.º 1
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: {
                    FirstName = input.ReadString();
                    break;
                }

                case 18: {
                    LastName = input.ReadString();
                    break;
                }

                case 26: {
                    if (address_ == null)
                    {
                        Address = new global::SpeedDemo.AddressPB();
                    }
                    input.ReadMessage(Address);
                    break;
                }
                }
            }
        }
Ejemplo n.º 2
0
 public void MergeFrom(CustomerPB other)
 {
     if (other == null)
     {
         return;
     }
     if (other.FirstName.Length != 0)
     {
         FirstName = other.FirstName;
     }
     if (other.LastName.Length != 0)
     {
         LastName = other.LastName;
     }
     if (other.address_ != null)
     {
         if (address_ == null)
         {
             Address = new global::SpeedDemo.AddressPB();
         }
         Address.MergeFrom(other.Address);
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }