JSRuntime.ReadJSDataAsStreamAsync 方法

定义

Stream为 表示jsStreamReference的数据引用提供 。

protected internal virtual System.Threading.Tasks.Task<System.IO.Stream> ReadJSDataAsStreamAsync (Microsoft.JSInterop.IJSStreamReference jsStreamReference, long totalLength, System.Threading.CancellationToken cancellationToken = default);
abstract member ReadJSDataAsStreamAsync : Microsoft.JSInterop.IJSStreamReference * int64 * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.IO.Stream>
override this.ReadJSDataAsStreamAsync : Microsoft.JSInterop.IJSStreamReference * int64 * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.IO.Stream>
Protected Friend Overridable Function ReadJSDataAsStreamAsync (jsStreamReference As IJSStreamReference, totalLength As Long, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Stream)

参数

jsStreamReference
IJSStreamReference

IJSStreamReference 为其生成数据流。

totalLength
Int64

传入数据流的预期长度。

cancellationToken
CancellationToken

CancellationToken 用于取消读取。

返回

Stream 表示的数据引用 jsStreamReference

适用于