SuperStreamReadAsync(MemoryByte, CancellationToken) - метод
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.
Пространство имён: Tessa.Platform.IOСборка: Tessa (в Tessa.dll) Версия: 4.0.4
public override ValueTask<int> ReadAsync(
Memory<byte> buffer,
CancellationToken cancellationToken = default
)
Public Overrides Function ReadAsync (
buffer As Memory(Of Byte),
Optional cancellationToken As CancellationToken = Nothing
) As ValueTask(Of Integer)
public:
virtual ValueTask<int> ReadAsync(
Memory<unsigned char> buffer,
CancellationToken cancellationToken = CancellationToken()
) override
abstract ReadAsync :
buffer : Memory<byte> *
?cancellationToken : CancellationToken
(* Defaults:
let _cancellationToken = defaultArg cancellationToken new CancellationToken()
*)
-> ValueTask<int>
override ReadAsync :
buffer : Memory<byte> *
?cancellationToken : CancellationToken
(* Defaults:
let _cancellationToken = defaultArg cancellationToken new CancellationToken()
*)
-> ValueTask<int>
- buffer MemoryByte
- The region of memory to write the data into.
- cancellationToken CancellationToken (Optional)
- The token to monitor for cancellation requests. The default value is None.
ValueTaskInt32A task that represents the asynchronous read operation. The value of its
Result property contains the total number of bytes read into the buffer. The result value can be less than the number of bytes allocated in the buffer if that many bytes are not currently available, or it can be 0 (zero) if the end of the stream has been reached.