FileBufferingWriteStream.ReadAsync Method

Definition

Overloads

ReadAsync(Memory<Byte>, CancellationToken)

Source:
FileBufferingWriteStream.cs

Asynchronously reads a sequence of bytes from the current stream, advances the position within the stream by the number of bytes read, and monitors cancellation requests.

C#
public override System.Threading.Tasks.ValueTask<int> ReadAsync (Memory<byte> buffer, System.Threading.CancellationToken cancellationToken);

Parameters

buffer
Memory<Byte>
cancellationToken
CancellationToken

Returns

Applies to

ASP.NET Core 9.0 and other versions
Product Versions
ASP.NET Core 7.0, 8.0, 9.0

ReadAsync(Byte[], Int32, Int32, CancellationToken)

Source:
FileBufferingWriteStream.cs

Asynchronously reads a sequence of bytes from the current stream, advances the position within the stream by the number of bytes read, and monitors cancellation requests.

C#
public override System.Threading.Tasks.Task<int> ReadAsync (byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken);

Parameters

buffer
Byte[]
offset
Int32
count
Int32
cancellationToken
CancellationToken

Returns

Applies to

ASP.NET Core 9.0 and other versions
Product Versions
ASP.NET Core 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0