Merge pull request #5708 from TeBoring/3.7.x-cherry-pick

Cherry-pick (#5686) to 3.7.x
pull/5715/head
Paul Yang 6 years ago committed by GitHub
commit 4de1551696
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      csharp/src/AddressBook/Addressbook.cs
  2. 16
      csharp/src/Google.Protobuf.Conformance/Conformance.cs
  3. 28
      csharp/src/Google.Protobuf.Test/TestProtos/MapUnittestProto3.cs
  4. 12
      csharp/src/Google.Protobuf.Test/TestProtos/TestMessagesProto3.cs
  5. 84
      csharp/src/Google.Protobuf.Test/TestProtos/UnittestCustomOptionsProto3.cs
  6. 4
      csharp/src/Google.Protobuf.Test/TestProtos/UnittestImportProto3.cs
  7. 4
      csharp/src/Google.Protobuf.Test/TestProtos/UnittestImportPublicProto3.cs
  8. 52
      csharp/src/Google.Protobuf.Test/TestProtos/UnittestIssues.cs
  9. 156
      csharp/src/Google.Protobuf.Test/TestProtos/UnittestProto3.cs
  10. 16
      csharp/src/Google.Protobuf.Test/TestProtos/UnittestWellKnownTypes.cs
  11. 76
      csharp/src/Google.Protobuf/Reflection/Descriptor.cs
  12. 23
      csharp/src/Google.Protobuf/UnknownFieldSet.cs
  13. 4
      csharp/src/Google.Protobuf/WellKnownTypes/Any.cs
  14. 12
      csharp/src/Google.Protobuf/WellKnownTypes/Api.cs
  15. 4
      csharp/src/Google.Protobuf/WellKnownTypes/Duration.cs
  16. 4
      csharp/src/Google.Protobuf/WellKnownTypes/Empty.cs
  17. 4
      csharp/src/Google.Protobuf/WellKnownTypes/FieldMask.cs
  18. 4
      csharp/src/Google.Protobuf/WellKnownTypes/SourceContext.cs
  19. 12
      csharp/src/Google.Protobuf/WellKnownTypes/Struct.cs
  20. 4
      csharp/src/Google.Protobuf/WellKnownTypes/Timestamp.cs
  21. 20
      csharp/src/Google.Protobuf/WellKnownTypes/Type.cs
  22. 36
      csharp/src/Google.Protobuf/WellKnownTypes/Wrappers.cs
  23. 13
      src/google/protobuf/compiler/csharp/csharp_helpers.cc
  24. 3
      src/google/protobuf/compiler/csharp/csharp_helpers.h
  25. 13
      src/google/protobuf/compiler/csharp/csharp_message.cc
  26. 1
      src/google/protobuf/compiler/csharp/csharp_message.h

@ -260,9 +260,7 @@ namespace Google.Protobuf.Examples.AddressBook {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 10: { case 10: {
Name = input.ReadString(); Name = input.ReadString();
@ -442,9 +440,7 @@ namespace Google.Protobuf.Examples.AddressBook {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 10: { case 10: {
Number = input.ReadString(); Number = input.ReadString();
@ -577,9 +573,7 @@ namespace Google.Protobuf.Examples.AddressBook {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 10: { case 10: {
people_.AddEntriesFrom(input, _repeated_people_codec); people_.AddEntriesFrom(input, _repeated_people_codec);

@ -216,9 +216,7 @@ namespace Conformance {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 10: { case 10: {
failure_.AddEntriesFrom(input, _repeated_failure_codec); failure_.AddEntriesFrom(input, _repeated_failure_codec);
@ -581,9 +579,7 @@ namespace Conformance {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 10: { case 10: {
ProtobufPayload = input.ReadBytes(); ProtobufPayload = input.ReadBytes();
@ -1001,9 +997,7 @@ namespace Conformance {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 10: { case 10: {
ParseError = input.ReadString(); ParseError = input.ReadString();
@ -1166,9 +1160,7 @@ namespace Conformance {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 8: { case 8: {
UseJspbArrayAnyFormat = input.ReadBool(); UseJspbArrayAnyFormat = input.ReadBool();

@ -541,9 +541,7 @@ namespace Google.Protobuf.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 10: { case 10: {
mapInt32Int32_.AddEntriesFrom(input, _map_mapInt32Int32_codec); mapInt32Int32_.AddEntriesFrom(input, _map_mapInt32Int32_codec);
@ -739,9 +737,7 @@ namespace Google.Protobuf.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 10: { case 10: {
if (testMap_ == null) { if (testMap_ == null) {
@ -865,9 +861,7 @@ namespace Google.Protobuf.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 10: { case 10: {
mapInt32Message_.AddEntriesFrom(input, _map_mapInt32Message_codec); mapInt32Message_.AddEntriesFrom(input, _map_mapInt32Message_codec);
@ -1007,9 +1001,7 @@ namespace Google.Protobuf.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 10: { case 10: {
map1_.AddEntriesFrom(input, _map_map1_codec); map1_.AddEntriesFrom(input, _map_map1_codec);
@ -1358,9 +1350,7 @@ namespace Google.Protobuf.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 10: { case 10: {
mapInt32Int32_.AddEntriesFrom(input, _map_mapInt32Int32_codec); mapInt32Int32_.AddEntriesFrom(input, _map_mapInt32Int32_codec);
@ -1541,9 +1531,7 @@ namespace Google.Protobuf.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 10: { case 10: {
type_.AddEntriesFrom(input, _map_type_codec); type_.AddEntriesFrom(input, _map_type_codec);
@ -1678,9 +1666,7 @@ namespace Google.Protobuf.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 10: { case 10: {
entry_.AddEntriesFrom(input, _map_entry_codec); entry_.AddEntriesFrom(input, _map_entry_codec);

@ -2895,9 +2895,7 @@ namespace ProtobufTestMessages.Proto3 {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 8: { case 8: {
OptionalInt32 = input.ReadInt32(); OptionalInt32 = input.ReadInt32();
@ -3625,9 +3623,7 @@ namespace ProtobufTestMessages.Proto3 {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 8: { case 8: {
A = input.ReadInt32(); A = input.ReadInt32();
@ -3768,9 +3764,7 @@ namespace ProtobufTestMessages.Proto3 {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 8: { case 8: {
C = input.ReadInt32(); C = input.ReadInt32();

@ -352,9 +352,7 @@ namespace UnitTest.Issues.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 10: { case 10: {
Field1 = input.ReadString(); Field1 = input.ReadString();
@ -480,9 +478,7 @@ namespace UnitTest.Issues.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
} }
} }
@ -583,9 +579,7 @@ namespace UnitTest.Issues.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
} }
} }
@ -686,9 +680,7 @@ namespace UnitTest.Issues.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
} }
} }
@ -789,9 +781,7 @@ namespace UnitTest.Issues.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
} }
} }
@ -892,9 +882,7 @@ namespace UnitTest.Issues.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
} }
} }
@ -1008,9 +996,7 @@ namespace UnitTest.Issues.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
} }
} }
@ -1111,9 +1097,7 @@ namespace UnitTest.Issues.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
} }
} }
@ -1214,9 +1198,7 @@ namespace UnitTest.Issues.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
} }
} }
@ -1317,9 +1299,7 @@ namespace UnitTest.Issues.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
} }
} }
@ -1420,9 +1400,7 @@ namespace UnitTest.Issues.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
} }
} }
@ -1523,9 +1501,7 @@ namespace UnitTest.Issues.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
} }
} }
@ -1714,9 +1690,7 @@ namespace UnitTest.Issues.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 8: { case 8: {
Foo = input.ReadInt32(); Foo = input.ReadInt32();
@ -1928,9 +1902,7 @@ namespace UnitTest.Issues.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 10: { case 10: {
if (bar_ == null) { if (bar_ == null) {
@ -2079,9 +2051,7 @@ namespace UnitTest.Issues.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 8: { case 8: {
Waldo = input.ReadInt32(); Waldo = input.ReadInt32();
@ -2215,9 +2185,7 @@ namespace UnitTest.Issues.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 8: { case 8: {
Qux = input.ReadInt32(); Qux = input.ReadInt32();
@ -2325,9 +2293,7 @@ namespace UnitTest.Issues.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
} }
} }
@ -2509,9 +2475,7 @@ namespace UnitTest.Issues.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 8: { case 8: {
I = input.ReadInt32(); I = input.ReadInt32();
@ -2651,9 +2615,7 @@ namespace UnitTest.Issues.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 8: { case 8: {
Fieldname = input.ReadInt32(); Fieldname = input.ReadInt32();
@ -2761,9 +2723,7 @@ namespace UnitTest.Issues.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
} }
} }
@ -2895,9 +2855,7 @@ namespace UnitTest.Issues.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 8: { case 8: {
NestedField = input.ReadInt32(); NestedField = input.ReadInt32();

@ -167,9 +167,7 @@ namespace Google.Protobuf.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 8: { case 8: {
D = input.ReadInt32(); D = input.ReadInt32();

@ -155,9 +155,7 @@ namespace Google.Protobuf.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 8: { case 8: {
E = input.ReadInt32(); E = input.ReadInt32();

@ -181,9 +181,7 @@ namespace UnitTest.Issues.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
} }
} }
@ -286,9 +284,7 @@ namespace UnitTest.Issues.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
} }
} }
@ -391,9 +387,7 @@ namespace UnitTest.Issues.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
} }
} }
@ -560,9 +554,7 @@ namespace UnitTest.Issues.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 8: { case 8: {
Value = (global::UnitTest.Issues.TestProtos.NegativeEnum) input.ReadEnum(); Value = (global::UnitTest.Issues.TestProtos.NegativeEnum) input.ReadEnum();
@ -677,9 +669,7 @@ namespace UnitTest.Issues.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
} }
} }
@ -909,9 +899,7 @@ namespace UnitTest.Issues.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 8: { case 8: {
PrimitiveValue = input.ReadInt32(); PrimitiveValue = input.ReadInt32();
@ -1068,9 +1056,7 @@ namespace UnitTest.Issues.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 8: { case 8: {
Item = input.ReadInt32(); Item = input.ReadInt32();
@ -1223,9 +1209,7 @@ namespace UnitTest.Issues.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 8: { case 8: {
Types_ = input.ReadInt32(); Types_ = input.ReadInt32();
@ -1339,9 +1323,7 @@ namespace UnitTest.Issues.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
} }
} }
@ -1665,9 +1647,7 @@ namespace UnitTest.Issues.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 10: { case 10: {
PlainString = input.ReadString(); PlainString = input.ReadString();
@ -1867,9 +1847,7 @@ namespace UnitTest.Issues.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 10: { case 10: {
Name = input.ReadString(); Name = input.ReadString();
@ -2069,9 +2047,7 @@ namespace UnitTest.Issues.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 10: { case 10: {
Text = input.ReadString(); Text = input.ReadString();
@ -2235,9 +2211,7 @@ namespace UnitTest.Issues.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 8: { case 8: {
X = input.ReadInt32(); X = input.ReadInt32();

@ -1387,9 +1387,7 @@ namespace Google.Protobuf.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 8: { case 8: {
SingleInt32 = input.ReadInt32(); SingleInt32 = input.ReadInt32();
@ -1757,9 +1755,7 @@ namespace Google.Protobuf.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 8: { case 8: {
Bb = input.ReadInt32(); Bb = input.ReadInt32();
@ -1942,9 +1938,7 @@ namespace Google.Protobuf.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 10: { case 10: {
if (child_ == null) { if (child_ == null) {
@ -2088,9 +2082,7 @@ namespace Google.Protobuf.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 8: { case 8: {
DeprecatedInt32 = input.ReadInt32(); DeprecatedInt32 = input.ReadInt32();
@ -2223,9 +2215,7 @@ namespace Google.Protobuf.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 8: { case 8: {
C = input.ReadInt32(); C = input.ReadInt32();
@ -2330,9 +2320,7 @@ namespace Google.Protobuf.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
} }
} }
@ -2463,9 +2451,7 @@ namespace Google.Protobuf.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 10: { case 10: {
if (foreignNested_ == null) { if (foreignNested_ == null) {
@ -2628,9 +2614,7 @@ namespace Google.Protobuf.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 8: { case 8: {
A = input.ReadInt32(); A = input.ReadInt32();
@ -2790,9 +2774,7 @@ namespace Google.Protobuf.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 10: { case 10: {
if (a_ == null) { if (a_ == null) {
@ -2934,9 +2916,7 @@ namespace Google.Protobuf.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 10: { case 10: {
if (bb_ == null) { if (bb_ == null) {
@ -3095,9 +3075,7 @@ namespace Google.Protobuf.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 10: { case 10: {
if (a_ == null) { if (a_ == null) {
@ -3233,9 +3211,7 @@ namespace Google.Protobuf.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 8: { case 8: {
Value = (global::Google.Protobuf.TestProtos.TestEnumWithDupValue) input.ReadEnum(); Value = (global::Google.Protobuf.TestProtos.TestEnumWithDupValue) input.ReadEnum();
@ -3507,9 +3483,7 @@ namespace Google.Protobuf.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 8: { case 8: {
PrimitiveField = input.ReadInt32(); PrimitiveField = input.ReadInt32();
@ -3750,9 +3724,7 @@ namespace Google.Protobuf.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 8: { case 8: {
MyInt = input.ReadInt64(); MyInt = input.ReadInt64();
@ -3927,9 +3899,7 @@ namespace Google.Protobuf.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 8: { case 8: {
Bb = input.ReadInt32(); Bb = input.ReadInt32();
@ -4067,9 +4037,7 @@ namespace Google.Protobuf.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 8: { case 8: {
SparseEnum = (global::Google.Protobuf.TestProtos.TestSparseEnum) input.ReadEnum(); SparseEnum = (global::Google.Protobuf.TestProtos.TestSparseEnum) input.ReadEnum();
@ -4201,9 +4169,7 @@ namespace Google.Protobuf.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 10: { case 10: {
Data = input.ReadString(); Data = input.ReadString();
@ -4324,9 +4290,7 @@ namespace Google.Protobuf.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 10: { case 10: {
data_.AddEntriesFrom(input, _repeated_data_codec); data_.AddEntriesFrom(input, _repeated_data_codec);
@ -4455,9 +4419,7 @@ namespace Google.Protobuf.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 10: { case 10: {
Data = input.ReadBytes(); Data = input.ReadBytes();
@ -4586,9 +4548,7 @@ namespace Google.Protobuf.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 10: { case 10: {
Data = input.ReadBytes(); Data = input.ReadBytes();
@ -4720,9 +4680,7 @@ namespace Google.Protobuf.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 8: { case 8: {
Data = input.ReadInt32(); Data = input.ReadInt32();
@ -4851,9 +4809,7 @@ namespace Google.Protobuf.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 8: { case 8: {
Data = input.ReadUInt32(); Data = input.ReadUInt32();
@ -4982,9 +4938,7 @@ namespace Google.Protobuf.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 8: { case 8: {
Data = input.ReadInt64(); Data = input.ReadInt64();
@ -5113,9 +5067,7 @@ namespace Google.Protobuf.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 8: { case 8: {
Data = input.ReadUInt64(); Data = input.ReadUInt64();
@ -5244,9 +5196,7 @@ namespace Google.Protobuf.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 8: { case 8: {
Data = input.ReadBool(); Data = input.ReadBool();
@ -5463,9 +5413,7 @@ namespace Google.Protobuf.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 8: { case 8: {
FooInt = input.ReadInt32(); FooInt = input.ReadInt32();
@ -5807,9 +5755,7 @@ namespace Google.Protobuf.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 722: case 722:
case 720: { case 720: {
@ -6208,9 +6154,7 @@ namespace Google.Protobuf.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 722: case 722:
case 720: { case 720: {
@ -6491,9 +6435,7 @@ namespace Google.Protobuf.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 98: case 98:
case 101: { case 101: {
@ -6651,9 +6593,7 @@ namespace Google.Protobuf.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 10: { case 10: {
A = input.ReadString(); A = input.ReadString();
@ -6761,9 +6701,7 @@ namespace Google.Protobuf.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
} }
} }
@ -6864,9 +6802,7 @@ namespace Google.Protobuf.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
} }
} }
@ -6967,9 +6903,7 @@ namespace Google.Protobuf.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
} }
} }
@ -7070,9 +7004,7 @@ namespace Google.Protobuf.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
} }
} }
@ -7173,9 +7105,7 @@ namespace Google.Protobuf.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
} }
} }
@ -7276,9 +7206,7 @@ namespace Google.Protobuf.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
} }
} }
@ -7379,9 +7307,7 @@ namespace Google.Protobuf.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
} }
} }
@ -7512,9 +7438,7 @@ namespace Google.Protobuf.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 10: { case 10: {
Text = input.ReadString(); Text = input.ReadString();
@ -7661,9 +7585,7 @@ namespace Google.Protobuf.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 10: { case 10: {
NestedText = input.ReadString(); NestedText = input.ReadString();

@ -788,9 +788,7 @@ namespace Google.Protobuf.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 10: { case 10: {
if (anyField_ == null) { if (anyField_ == null) {
@ -1318,9 +1316,7 @@ namespace Google.Protobuf.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 10: { case 10: {
anyField_.AddEntriesFrom(input, _repeated_anyField_codec); anyField_.AddEntriesFrom(input, _repeated_anyField_codec);
@ -2031,9 +2027,7 @@ namespace Google.Protobuf.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 10: { case 10: {
global::Google.Protobuf.WellKnownTypes.Any subBuilder = new global::Google.Protobuf.WellKnownTypes.Any(); global::Google.Protobuf.WellKnownTypes.Any subBuilder = new global::Google.Protobuf.WellKnownTypes.Any();
@ -2544,9 +2538,7 @@ namespace Google.Protobuf.TestProtos {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 10: { case 10: {
anyField_.AddEntriesFrom(input, _map_anyField_codec); anyField_.AddEntriesFrom(input, _map_anyField_codec);

@ -302,9 +302,7 @@ namespace Google.Protobuf.Reflection {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 10: { case 10: {
file_.AddEntriesFrom(input, _repeated_file_codec); file_.AddEntriesFrom(input, _repeated_file_codec);
@ -735,9 +733,7 @@ namespace Google.Protobuf.Reflection {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 10: { case 10: {
Name = input.ReadString(); Name = input.ReadString();
@ -1102,9 +1098,7 @@ namespace Google.Protobuf.Reflection {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 10: { case 10: {
Name = input.ReadString(); Name = input.ReadString();
@ -1363,9 +1357,7 @@ namespace Google.Protobuf.Reflection {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 8: { case 8: {
Start = input.ReadInt32(); Start = input.ReadInt32();
@ -1568,9 +1560,7 @@ namespace Google.Protobuf.Reflection {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 8: { case 8: {
Start = input.ReadInt32(); Start = input.ReadInt32();
@ -1703,9 +1693,7 @@ namespace Google.Protobuf.Reflection {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 7994: { case 7994: {
uninterpretedOption_.AddEntriesFrom(input, _repeated_uninterpretedOption_codec); uninterpretedOption_.AddEntriesFrom(input, _repeated_uninterpretedOption_codec);
@ -2212,9 +2200,7 @@ namespace Google.Protobuf.Reflection {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 10: { case 10: {
Name = input.ReadString(); Name = input.ReadString();
@ -2501,9 +2487,7 @@ namespace Google.Protobuf.Reflection {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 10: { case 10: {
Name = input.ReadString(); Name = input.ReadString();
@ -2748,9 +2732,7 @@ namespace Google.Protobuf.Reflection {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 10: { case 10: {
Name = input.ReadString(); Name = input.ReadString();
@ -2966,9 +2948,7 @@ namespace Google.Protobuf.Reflection {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 8: { case 8: {
Start = input.ReadInt32(); Start = input.ReadInt32();
@ -3197,9 +3177,7 @@ namespace Google.Protobuf.Reflection {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 10: { case 10: {
Name = input.ReadString(); Name = input.ReadString();
@ -3407,9 +3385,7 @@ namespace Google.Protobuf.Reflection {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 10: { case 10: {
Name = input.ReadString(); Name = input.ReadString();
@ -3759,9 +3735,7 @@ namespace Google.Protobuf.Reflection {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 10: { case 10: {
Name = input.ReadString(); Name = input.ReadString();
@ -6949,9 +6923,7 @@ namespace Google.Protobuf.Reflection {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 18: { case 18: {
name_.AddEntriesFrom(input, _repeated_name_codec); name_.AddEntriesFrom(input, _repeated_name_codec);
@ -7164,9 +7136,7 @@ namespace Google.Protobuf.Reflection {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 10: { case 10: {
NamePart_ = input.ReadString(); NamePart_ = input.ReadString();
@ -7345,9 +7315,7 @@ namespace Google.Protobuf.Reflection {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 10: { case 10: {
location_.AddEntriesFrom(input, _repeated_location_codec); location_.AddEntriesFrom(input, _repeated_location_codec);
@ -7655,9 +7623,7 @@ namespace Google.Protobuf.Reflection {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 10: case 10:
case 8: { case 8: {
@ -7810,9 +7776,7 @@ namespace Google.Protobuf.Reflection {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 10: { case 10: {
annotation_.AddEntriesFrom(input, _repeated_annotation_codec); annotation_.AddEntriesFrom(input, _repeated_annotation_codec);
@ -8063,9 +8027,7 @@ namespace Google.Protobuf.Reflection {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 10: case 10:
case 8: { case 8: {

@ -261,29 +261,6 @@ namespace Google.Protobuf
return unknownFields; return unknownFields;
} }
/// <summary>
/// Create a new UnknownFieldSet if unknownFields is null.
/// Parse a single field from <paramref name="input"/> and merge it
/// into unknownFields. If <paramref name="input"/> is configured to discard unknown fields,
/// <paramref name="unknownFields"/> will be returned as-is and the field will be skipped.
/// </summary>
/// <param name="unknownFields">The UnknownFieldSet which need to be merged</param>
/// <param name="input">The coded input stream containing the field</param>
/// <returns>The merged UnknownFieldSet</returns>
public static bool MergeFieldFrom(ref UnknownFieldSet unknownFields, CodedInputStream input)
{
if (input.DiscardUnknownFields)
{
input.SkipLastField();
return true;
}
if (unknownFields == null)
{
unknownFields = new UnknownFieldSet();
}
return unknownFields.MergeFieldFrom(input);
}
/// <summary> /// <summary>
/// Merges the fields from <paramref name="other"/> into this set. /// Merges the fields from <paramref name="other"/> into this set.
/// If a field number exists in both sets, the values in <paramref name="other"/> /// If a field number exists in both sets, the values in <paramref name="other"/>

@ -292,9 +292,7 @@ namespace Google.Protobuf.WellKnownTypes {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 10: { case 10: {
TypeUrl = input.ReadString(); TypeUrl = input.ReadString();

@ -345,9 +345,7 @@ namespace Google.Protobuf.WellKnownTypes {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 10: { case 10: {
Name = input.ReadString(); Name = input.ReadString();
@ -663,9 +661,7 @@ namespace Google.Protobuf.WellKnownTypes {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 10: { case 10: {
Name = input.ReadString(); Name = input.ReadString();
@ -929,9 +925,7 @@ namespace Google.Protobuf.WellKnownTypes {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 10: { case 10: {
Name = input.ReadString(); Name = input.ReadString();

@ -254,9 +254,7 @@ namespace Google.Protobuf.WellKnownTypes {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 8: { case 8: {
Seconds = input.ReadInt64(); Seconds = input.ReadInt64();

@ -143,9 +143,7 @@ namespace Google.Protobuf.WellKnownTypes {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
} }
} }

@ -352,9 +352,7 @@ namespace Google.Protobuf.WellKnownTypes {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 10: { case 10: {
paths_.AddEntriesFrom(input, _repeated_paths_codec); paths_.AddEntriesFrom(input, _repeated_paths_codec);

@ -165,9 +165,7 @@ namespace Google.Protobuf.WellKnownTypes {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 10: { case 10: {
FileName = input.ReadString(); FileName = input.ReadString();

@ -189,9 +189,7 @@ namespace Google.Protobuf.WellKnownTypes {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 10: { case 10: {
fields_.AddEntriesFrom(input, _map_fields_codec); fields_.AddEntriesFrom(input, _map_fields_codec);
@ -515,9 +513,7 @@ namespace Google.Protobuf.WellKnownTypes {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 8: { case 8: {
kind_ = input.ReadEnum(); kind_ = input.ReadEnum();
@ -677,9 +673,7 @@ namespace Google.Protobuf.WellKnownTypes {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 10: { case 10: {
values_.AddEntriesFrom(input, _repeated_values_codec); values_.AddEntriesFrom(input, _repeated_values_codec);

@ -273,9 +273,7 @@ namespace Google.Protobuf.WellKnownTypes {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 8: { case 8: {
Seconds = input.ReadInt64(); Seconds = input.ReadInt64();

@ -328,9 +328,7 @@ namespace Google.Protobuf.WellKnownTypes {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 10: { case 10: {
Name = input.ReadString(); Name = input.ReadString();
@ -725,9 +723,7 @@ namespace Google.Protobuf.WellKnownTypes {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 8: { case 8: {
Kind = (global::Google.Protobuf.WellKnownTypes.Field.Types.Kind) input.ReadEnum(); Kind = (global::Google.Protobuf.WellKnownTypes.Field.Types.Kind) input.ReadEnum();
@ -1104,9 +1100,7 @@ namespace Google.Protobuf.WellKnownTypes {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 10: { case 10: {
Name = input.ReadString(); Name = input.ReadString();
@ -1306,9 +1300,7 @@ namespace Google.Protobuf.WellKnownTypes {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 10: { case 10: {
Name = input.ReadString(); Name = input.ReadString();
@ -1488,9 +1480,7 @@ namespace Google.Protobuf.WellKnownTypes {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 10: { case 10: {
Name = input.ReadString(); Name = input.ReadString();

@ -177,9 +177,7 @@ namespace Google.Protobuf.WellKnownTypes {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 9: { case 9: {
Value = input.ReadDouble(); Value = input.ReadDouble();
@ -316,9 +314,7 @@ namespace Google.Protobuf.WellKnownTypes {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 13: { case 13: {
Value = input.ReadFloat(); Value = input.ReadFloat();
@ -455,9 +451,7 @@ namespace Google.Protobuf.WellKnownTypes {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 8: { case 8: {
Value = input.ReadInt64(); Value = input.ReadInt64();
@ -594,9 +588,7 @@ namespace Google.Protobuf.WellKnownTypes {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 8: { case 8: {
Value = input.ReadUInt64(); Value = input.ReadUInt64();
@ -733,9 +725,7 @@ namespace Google.Protobuf.WellKnownTypes {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 8: { case 8: {
Value = input.ReadInt32(); Value = input.ReadInt32();
@ -872,9 +862,7 @@ namespace Google.Protobuf.WellKnownTypes {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 8: { case 8: {
Value = input.ReadUInt32(); Value = input.ReadUInt32();
@ -1011,9 +999,7 @@ namespace Google.Protobuf.WellKnownTypes {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 8: { case 8: {
Value = input.ReadBool(); Value = input.ReadBool();
@ -1150,9 +1136,7 @@ namespace Google.Protobuf.WellKnownTypes {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 10: { case 10: {
Value = input.ReadString(); Value = input.ReadString();
@ -1289,9 +1273,7 @@ namespace Google.Protobuf.WellKnownTypes {
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
switch(tag) { switch(tag) {
default: default:
if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
return;
}
break; break;
case 10: { case 10: {
Value = input.ReadBytes(); Value = input.ReadBytes();

@ -278,6 +278,19 @@ std::string GetEnumValueName(const std::string& enum_name, const std::string& en
return result; return result;
} }
uint GetGroupEndTag(const Descriptor* descriptor) {
const Descriptor* containing_type = descriptor->containing_type();
if (containing_type == NULL) {
return 0;
}
const FieldDescriptor* field = containing_type->FindFieldByName(descriptor->name());
if (field != NULL && field->type() == FieldDescriptor::Type::TYPE_GROUP) {
return internal::WireFormatLite::MakeTag(field->number(), internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED);
} else {
return 0;
}
}
std::string ToCSharpName(const std::string& name, const FileDescriptor* file) { std::string ToCSharpName(const std::string& name, const FileDescriptor* file) {
std::string result = GetFileNamespace(file); std::string result = GetFileNamespace(file);
if (result != "") { if (result != "") {

@ -118,6 +118,9 @@ inline bool IsMapEntryMessage(const Descriptor* descriptor) {
return descriptor->options().map_entry(); return descriptor->options().map_entry();
} }
// Checks if this descriptor is for a group and gets its end tag or 0 if it's not a group
uint GetGroupEndTag(const Descriptor* descriptor);
// Determines whether we're generating code for the proto representation of // Determines whether we're generating code for the proto representation of
// descriptors etc, for use in the runtime. This is the only type which is // descriptors etc, for use in the runtime. This is the only type which is
// allowed to use proto2 syntax, and it generates internal classes. // allowed to use proto2 syntax, and it generates internal classes.

@ -63,7 +63,8 @@ MessageGenerator::MessageGenerator(const Descriptor* descriptor,
const Options* options) const Options* options)
: SourceGeneratorBase(descriptor->file(), options), : SourceGeneratorBase(descriptor->file(), options),
descriptor_(descriptor), descriptor_(descriptor),
has_bit_field_count_(0) { has_bit_field_count_(0),
end_tag_(GetGroupEndTag(descriptor)) {
// fields by number // fields by number
for (int i = 0; i < descriptor_->field_count(); i++) { for (int i = 0; i < descriptor_->field_count(); i++) {
fields_by_number_.push_back(descriptor_->field(i)); fields_by_number_.push_back(descriptor_->field(i));
@ -539,10 +540,14 @@ void MessageGenerator::GenerateMergingMethods(io::Printer* printer) {
} else { } else {
printer->Print( printer->Print(
"default:\n" "default:\n"
" if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) {\n" " _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);\n"
" return;\n"
" }\n"
" break;\n"); " break;\n");
if (end_tag_ != 0) {
printer->Print(
"$end_tag$:\n"
" return;\n",
"end_tag", SimpleItoa(end_tag_));
}
} }
for (int i = 0; i < fields_by_number().size(); i++) { for (int i = 0; i < fields_by_number().size(); i++) {
const FieldDescriptor* field = fields_by_number()[i]; const FieldDescriptor* field = fields_by_number()[i];

@ -59,6 +59,7 @@ class MessageGenerator : public SourceGeneratorBase {
const Descriptor* descriptor_; const Descriptor* descriptor_;
std::vector<const FieldDescriptor*> fields_by_number_; std::vector<const FieldDescriptor*> fields_by_number_;
int has_bit_field_count_; int has_bit_field_count_;
uint end_tag_;
void GenerateMessageSerializationMethods(io::Printer* printer); void GenerateMessageSerializationMethods(io::Printer* printer);
void GenerateMergingMethods(io::Printer* printer); void GenerateMergingMethods(io::Printer* printer);

Loading…
Cancel
Save