Skip to content

IOFileFormat<TFile>.ReadAsync Method ​

Definition ​

Reads a strongly typed file from a stream asynchronously.

c#
public new Task<TFile> ReadAsync(Stream stream, CancellationToken cancellationToken = null);

Parameters ​

NameTypeDescription
streamStreamThe stream to read from.
cancellationTokenCancellationTokenAn optional CancellationToken to cancel the reading.

Returns ​

Task<TFile>

The file that was read.