WriteOnlyStream.ReadAsync 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
ReadAsync(Memory<Byte>, CancellationToken) | |
ReadAsync(Byte[], Int32, Int32, CancellationToken) |
ReadAsync(Memory<Byte>, CancellationToken)
以非同步的方式從目前資料流讀取一連串的位元組、依所讀取的位元組數目進階資料流中的位置,以及監視取消要求。
public override System.Threading.Tasks.ValueTask<int> ReadAsync (Memory<byte> buffer, System.Threading.CancellationToken cancellationToken);
override this.ReadAsync : Memory<byte> * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<int>
Public Overrides Function ReadAsync (buffer As Memory(Of Byte), cancellationToken As CancellationToken) As ValueTask(Of Integer)
參數
- cancellationToken
- CancellationToken
傳回
適用於
ReadAsync(Byte[], Int32, Int32, CancellationToken)
以非同步的方式從目前資料流讀取一連串的位元組、依所讀取的位元組數目進階資料流中的位置,以及監視取消要求。
public:
override System::Threading::Tasks::Task<int> ^ ReadAsync(cli::array <System::Byte> ^ buffer, int offset, int count, System::Threading::CancellationToken cancellationToken);
public override System.Threading.Tasks.Task<int> ReadAsync (byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken);
override this.ReadAsync : byte[] * int * int * System.Threading.CancellationToken -> System.Threading.Tasks.Task<int>
Public Overrides Function ReadAsync (buffer As Byte(), offset As Integer, count As Integer, cancellationToken As CancellationToken) As Task(Of Integer)
參數
- buffer
- Byte[]
- offset
- Int32
- count
- Int32
- cancellationToken
- CancellationToken