Exemplo n.º 1
0
 public void MergeFrom(Drink other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Id != 0)
     {
         Id = other.Id;
     }
     if (other.Name.Length != 0)
     {
         Name = other.Name;
     }
     if (other.category_ != null)
     {
         if (category_ == null)
         {
             category_ = new global::prodrink.catalog.Category();
         }
         Category.MergeFrom(other.Category);
     }
     properties_.Add(other.properties_);
     imageUrls_.Add(other.imageUrls_);
     if (other.Description.Length != 0)
     {
         Description = other.Description;
     }
 }
Exemplo n.º 2
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

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

                case 8: {
                    Id = input.ReadInt32();
                    break;
                }

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

                case 26: {
                    if (category_ == null)
                    {
                        category_ = new global::prodrink.catalog.Category();
                    }
                    input.ReadMessage(category_);
                    break;
                }

                case 34: {
                    properties_.AddEntriesFrom(input, _repeated_properties_codec);
                    break;
                }

                case 42: {
                    imageUrls_.AddEntriesFrom(input, _repeated_imageUrls_codec);
                    break;
                }

                case 50: {
                    Description = input.ReadString();
                    break;
                }
                }
            }
        }
Exemplo n.º 3
0
 public void MergeFrom(Category other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Id != 0)
     {
         Id = other.Id;
     }
     if (other.Name.Length != 0)
     {
         Name = other.Name;
     }
     if (other.parentCategory_ != null)
     {
         if (parentCategory_ == null)
         {
             parentCategory_ = new global::prodrink.catalog.Category();
         }
         ParentCategory.MergeFrom(other.ParentCategory);
     }
     propertyTypes_.Add(other.propertyTypes_);
 }