I get data from a PipeReader
as a ReadOnlySequence
which I need to write into a Stream
, but I can't figure out how do to that? Here's my current code:
Stream blobStream = await blobClient.OpenWriteAsync(false);
while(true)
{
var readResult = await reader.ReadAsync();
ReadOnlySequence<byte> buffer = readResult.Buffer;
// here I want to write the buffer to the Stream - but how?
// e.g. blobStream.WriteAsync(buffer) doesn't work as there is no matching method overload
}