ZXSpectrumFileFormat.LoadAsync Method
Overloads
| Name | Description |
|---|---|
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
| Name | Type | Description |
|---|---|---|
path | String | The path to the file to load. |
cancellationToken | CancellationToken | An optional CancellationToken to cancel the loading. |
Returns
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
| Name | Type | Description |
|---|---|---|
path | String | The path of the file in the stream. |
stream | Stream | The file. |
cancellationToken | CancellationToken | An optional CancellationToken to cancel the loading. |
Returns
The file that was read.