|
|
|
@ -72,7 +72,6 @@ namespace Google.Protobuf |
|
|
|
|
{ |
|
|
|
|
IMessage message = factory(); |
|
|
|
|
message.MergeFrom(data, DiscardUnknownFields, Extensions); |
|
|
|
|
CheckMergedRequiredFields(message); |
|
|
|
|
return message; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -87,7 +86,6 @@ namespace Google.Protobuf |
|
|
|
|
{ |
|
|
|
|
IMessage message = factory(); |
|
|
|
|
message.MergeFrom(data, offset, length, DiscardUnknownFields, Extensions); |
|
|
|
|
CheckMergedRequiredFields(message); |
|
|
|
|
return message; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -100,7 +98,6 @@ namespace Google.Protobuf |
|
|
|
|
{ |
|
|
|
|
IMessage message = factory(); |
|
|
|
|
message.MergeFrom(data, DiscardUnknownFields, Extensions); |
|
|
|
|
CheckMergedRequiredFields(message); |
|
|
|
|
return message; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -113,7 +110,6 @@ namespace Google.Protobuf |
|
|
|
|
{ |
|
|
|
|
IMessage message = factory(); |
|
|
|
|
message.MergeFrom(input, DiscardUnknownFields, Extensions); |
|
|
|
|
CheckMergedRequiredFields(message); |
|
|
|
|
return message; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -130,7 +126,6 @@ namespace Google.Protobuf |
|
|
|
|
{ |
|
|
|
|
IMessage message = factory(); |
|
|
|
|
message.MergeDelimitedFrom(input, DiscardUnknownFields, Extensions); |
|
|
|
|
CheckMergedRequiredFields(message); |
|
|
|
|
return message; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -143,7 +138,6 @@ namespace Google.Protobuf |
|
|
|
|
{ |
|
|
|
|
IMessage message = factory(); |
|
|
|
|
MergeFrom(message, input); |
|
|
|
|
CheckMergedRequiredFields(message); |
|
|
|
|
return message; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -176,12 +170,6 @@ namespace Google.Protobuf |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
internal static void CheckMergedRequiredFields(IMessage message) |
|
|
|
|
{ |
|
|
|
|
if (!message.IsInitialized()) |
|
|
|
|
throw new InvalidOperationException("Parsed message does not contain all required fields"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// Creates a new message parser which optionally discards unknown fields when parsing. |
|
|
|
|
/// </summary> |
|
|
|
|