Asynchronously writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written.
public override ValueTask WriteAsync(ReadOnlyMemory<byte> buffer,
CancellationToken cancellationToken = default)
Asynchronously writes a sequence of bytes to the current stream, advances the current position within this stream by the number of bytes written, and monitors cancellation requests.
public override Task WriteAsync(byte[] buffer, int offset, int count,
CancellationToken cancellationToken)