public void MergeFrom(Message other) { if (other == null) { return; } if (other.Type != 0) { Type = other.Type; } if (other.foo_ != null) { if (foo_ == null) { foo_ = new global::Google.Protobuf.Multimessage.Foo(); } Foo.MergeFrom(other.Foo); } if (other.bar_ != null) { if (bar_ == null) { bar_ = new global::Google.Protobuf.Multimessage.Bar(); } Bar.MergeFrom(other.Bar); } if (other.baz_ != null) { if (baz_ == null) { baz_ = new global::Google.Protobuf.Multimessage.Baz(); } Baz.MergeFrom(other.Baz); } }
public void MergeFrom(pb::CodedInputStream input) { uint tag; while ((tag = input.ReadTag()) != 0) { switch (tag) { default: input.SkipLastField(); break; case 8: { type_ = (global::Google.Protobuf.Multimessage.Message.Types.Type)input.ReadEnum(); break; } case 18: { if (foo_ == null) { foo_ = new global::Google.Protobuf.Multimessage.Foo(); } input.ReadMessage(foo_); break; } case 26: { if (bar_ == null) { bar_ = new global::Google.Protobuf.Multimessage.Bar(); } input.ReadMessage(bar_); break; } case 34: { if (baz_ == null) { baz_ = new global::Google.Protobuf.Multimessage.Baz(); } input.ReadMessage(baz_); break; } } } }