ParseFrom<T> for array slice is missing

pull/3861/head
Jan Tattermusch 7 years ago
parent 4a5e1bd043
commit 5f96191459
  1. 14
      csharp/src/Google.Protobuf/MessageParser.cs

@ -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…
Cancel
Save