Skip to content

ReadOnlySequenceHelper.ToReadOnlySequence(IEnumerable<byte[]>)

ToReadOnlySequence(IEnumerable<byte[]>)

staticextension
View source
public static ReadOnlySequence<byte> ToReadOnlySequence(this IEnumerable<byte[]> buffers)
Creates a read-only sequence whose segments are backed by the provided byte arrays.

Parameters

buffersIEnumerable<byte[]>
The buffers to include as sequence segments.

Returns

A read-only sequence containing the provided buffers in order.

Exceptions

System.ArgumentNullException
buffers is null.