Пример #1
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

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

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

                case 26: {
                    categories_.AddEntriesFrom(input, _repeated_categories_codec);
                    break;
                }

                case 58: {
                    Description = input.ReadString();
                    break;
                }

                case 74: {
                    if (otherThing_ == null)
                    {
                        otherThing_ = new global::DatomicNet.Core.Tests.OtherThing();
                    }
                    input.ReadMessage(otherThing_);
                    break;
                }
                }
            }
        }
Пример #2
0
 public void MergeFrom(TestAggregate other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Id != 0UL)
     {
         Id = other.Id;
     }
     categories_.Add(other.categories_);
     if (other.Description.Length != 0)
     {
         Description = other.Description;
     }
     if (other.otherThing_ != null)
     {
         if (otherThing_ == null)
         {
             otherThing_ = new global::DatomicNet.Core.Tests.OtherThing();
         }
         OtherThing.MergeFrom(other.OtherThing);
     }
 }