Share via


JSRuntime.ReadJSDataAsStreamAsync Method

Definition

Provides a Stream for the data reference represented by 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)

Parameters

jsStreamReference
IJSStreamReference

IJSStreamReference to produce a data stream for.

totalLength
Int64

Expected length of the incoming data stream.

cancellationToken
CancellationToken

CancellationToken for cancelling read.

Returns

Stream for the data reference represented by jsStreamReference.

Applies to