Skip to content

Commit

Permalink
Update MessageExtensions.cs
Browse files Browse the repository at this point in the history
Public the MergeFrom method of type ReadOnlySequence<byte>
  • Loading branch information
VAllens authored and jskeet committed Jan 20, 2023
1 parent a8e080b commit 0ddea03
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions csharp/src/Google.Protobuf/MessageExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,15 @@ public static void MergeFrom(this IMessage message, Stream input) =>
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>
Expand Down

0 comments on commit 0ddea03

Please sign in to comment.