Update MessageExtensions.cs

Public the MergeFrom method of type ReadOnlySequence<byte>
pull/11124/head
Allen 2 years ago committed by Jon Skeet
parent a8e080b48a
commit 0ddea03042
  1. 9
      csharp/src/Google.Protobuf/MessageExtensions.cs

@ -88,6 +88,15 @@ namespace Google.Protobuf
public static void MergeFrom(this IMessage message, ReadOnlySpan<byte> span) =>
MergeFrom(message, span, false, null);
/// <summary>
/// Merges data from the given sequence into an existing message.
/// </summary>
/// <param name="message">The message to merge the data into.</param>
/// <param name="sequence">Sequence from the specified data to merge, which must be protobuf-encoded binary data.</param>
[SecuritySafeCritical]
public static void MergeFrom(this IMessage message, ReadOnlySequence<byte> sequence) =>
MergeFrom(message, sequence, false, null);
/// <summary>
/// Merges length-delimited data from the given stream into an existing message.
/// </summary>

Loading…
Cancel
Save