ParseFrom<T> for array slice is missing
This commit is contained in:
parent
07542e78da
commit
30b6e54327
@ -208,6 +208,20 @@ namespace Google.Protobuf
|
||||
return message;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Parses a message from a byte array slice.
|
||||
/// </summary>
|
||||
/// <param name="data">The byte array containing the message. Must not be null.</param>
|
||||
/// <param name="offset">The offset of the slice to parse.</param>
|
||||
/// <param name="length">The length of the slice to parse.</param>
|
||||
/// <returns>The newly parsed message.</returns>
|
||||
public new T ParseFrom(byte[] data, int offset, int length)
|
||||
{
|
||||
T message = factory();
|
||||
message.MergeFrom(data, offset, length);
|
||||
return message;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Parses a message from the given byte string.
|
||||
/// </summary>
|
||||
|
Loading…
Reference in New Issue
Block a user