Skip to content

ZXSpectrumFileFormat.LoadAsync Method ​

Overloads ​

NameDescription
LoadAsync(String, CancellationToken)Loads a ZX Spectrum file from disk asynchronously.
LoadAsync(String, Stream, CancellationToken)Loads a ZX Spectrum file from a stream asynchronously.

LoadAsync(String, CancellationToken) ​

Loads a ZX Spectrum file from disk asynchronously.

c#
public static new Task<ZXSpectrumFile> LoadAsync(string path, CancellationToken cancellationToken = null);

Parameters ​

NameTypeDescription
pathStringThe path to the file to load.
cancellationTokenCancellationTokenAn optional CancellationToken to cancel the loading.

Returns ​

Task<ZXSpectrumFile>

The file that was read.

LoadAsync(String, Stream, CancellationToken) ​

Loads a ZX Spectrum file from a stream asynchronously.

c#
public static new Task<ZXSpectrumFile> LoadAsync(string path, Stream stream, CancellationToken cancellationToken = null);

Parameters ​

NameTypeDescription
pathStringThe path of the file in the stream.
streamStreamThe file.
cancellationTokenCancellationTokenAn optional CancellationToken to cancel the loading.

Returns ​

Task<ZXSpectrumFile>

The file that was read.