public void MergeFrom(Value other) { if (other == null) { return; } switch (other.KindCase) { case KindOneofCase.ObjectValue: if (ObjectValue == null) { ObjectValue = new global::System.Protobuf.Object(); } ObjectValue.MergeFrom(other.ObjectValue); break; case KindOneofCase.ListValue: if (ListValue == null) { ListValue = new global::System.Protobuf.ArrayValue(); } ListValue.MergeFrom(other.ListValue); break; case KindOneofCase.DictionaryValue: if (DictionaryValue == null) { DictionaryValue = new global::System.Protobuf.DictionaryValue(); } DictionaryValue.MergeFrom(other.DictionaryValue); break; } }
public void MergeFrom(pb::CodedInputStream input) { uint tag; while ((tag = input.ReadTag()) != 0) { switch (tag) { default: input.SkipLastField(); break; case 10: { global::System.Protobuf.Object subBuilder = new global::System.Protobuf.Object(); if (kindCase_ == KindOneofCase.ObjectValue) { subBuilder.MergeFrom(ObjectValue); } input.ReadMessage(subBuilder); ObjectValue = subBuilder; break; } case 18: { global::System.Protobuf.ArrayValue subBuilder = new global::System.Protobuf.ArrayValue(); if (kindCase_ == KindOneofCase.ListValue) { subBuilder.MergeFrom(ListValue); } input.ReadMessage(subBuilder); ListValue = subBuilder; break; } case 26: { global::System.Protobuf.DictionaryValue subBuilder = new global::System.Protobuf.DictionaryValue(); if (kindCase_ == KindOneofCase.DictionaryValue) { subBuilder.MergeFrom(DictionaryValue); } input.ReadMessage(subBuilder); DictionaryValue = subBuilder; break; } } } }