Exemple #1
0
 public void MergeFrom(HelloRequest other)
 {
     if (other == null)
     {
         return;
     }
     if (other.CustomerId.Length != 0)
     {
         CustomerId = other.CustomerId;
     }
     if (other.Name.Length != 0)
     {
         Name = other.Name;
     }
     if (other.HasAge)
     {
         Age = other.Age;
     }
     if (other.address_ != null)
     {
         if (address_ == null)
         {
             Address = new global::Google.Ads.GoogleAds.Tests.Address();
         }
         Address.MergeFrom(other.Address);
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
Exemple #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: {
                    CustomerId = input.ReadString();
                    break;
                }

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

                case 24: {
                    Age = input.ReadInt64();
                    break;
                }

                case 34: {
                    if (address_ == null)
                    {
                        Address = new global::Google.Ads.GoogleAds.Tests.Address();
                    }
                    input.ReadMessage(Address);
                    break;
                }
                }
            }
        }