Commit 30b6e543 authored by Jan Tattermusch's avatar Jan Tattermusch

ParseFrom<T> for array slice is missing

parent 07542e78
...@@ -208,6 +208,20 @@ namespace Google.Protobuf ...@@ -208,6 +208,20 @@ namespace Google.Protobuf
return message; 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> /// <summary>
/// Parses a message from the given byte string. /// Parses a message from the given byte string.
/// </summary> /// </summary>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment