Skip to content

IOFileFormat.ReadAsync Method

Overloads

Name Description
ReadAsync(Stream, CancellationToken) Reads a file from a stream asynchronously.
ReadAsync(IBinaryReader) Reads a file from an IBinaryReader.

ReadAsync(Stream, CancellationToken)

Reads a file from a stream asynchronously.

public Task<IOFile> ReadAsync(Stream stream, CancellationToken cancellationToken = null);

Parameters

Name Type Description
stream Stream The stream to read from.
cancellationToken CancellationToken An optional CancellationToken to cancel the reading.

Returns

Task<IOFile>

The file that was read.

ReadAsync(IBinaryReader)

Reads a file from an IBinaryReader.

protected abstract ValueTask<IOFile> ReadAsync(IBinaryReader reader);

Parameters

Name Type Description
reader IBinaryReader The IBinaryReader to read from.

Returns

ValueTask<IOFile>

The file that was read.