thrownewInvalidProtocolBufferException("Merge an unknown field of end-group tag, indicating that the corresponding start-group was missing.");
returnfalse;
}
}
default:
default:
thrownewInvalidOperationException("Wire Type is invalid.");
thrownewInvalidOperationException("Wire Type is invalid.");
...
@@ -248,8 +254,34 @@ namespace Google.Protobuf
...
@@ -248,8 +254,34 @@ namespace Google.Protobuf
{
{
unknownFields=newUnknownFieldSet();
unknownFields=newUnknownFieldSet();
}
}
unknownFields.MergeFieldFrom(input);
if(!unknownFields.MergeFieldFrom(input))
{
thrownewInvalidProtocolBufferException("Merge an unknown field of end-group tag, indicating that the corresponding start-group was missing.");// match the old code-gen
}
returnunknownFields;
returnunknownFields;
}
/// <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>