Canged CodedInputStream.ReadTag to use boolean result with out params to
support reading a field name rather than a field tag.
diff --git a/src/ProtocolBuffersLite.Test/TestProtos/UnitTestImportLiteProtoFile.cs b/src/ProtocolBuffersLite.Test/TestProtos/UnitTestImportLiteProtoFile.cs
index 2002d8d..db26d72 100644
--- a/src/ProtocolBuffersLite.Test/TestProtos/UnitTestImportLiteProtoFile.cs
+++ b/src/ProtocolBuffersLite.Test/TestProtos/UnitTestImportLiteProtoFile.cs
@@ -207,11 +207,12 @@
}
public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- while (true) {
- uint tag = input.ReadTag();
+ uint tag;
+ string field_name;
+ while (input.ReadTag(out tag, out field_name)) {
switch (tag) {
case 0: {
- return this;
+ throw InvalidProtocolBufferException.InvalidTag();
}
default: {
if (pb::WireFormat.IsEndGroupTag(tag)) {
@@ -226,6 +227,8 @@
}
}
}
+
+ return this;
}