-
Notifications
You must be signed in to change notification settings - Fork 41
Downloader
Download game files.
Downloaders should inherit IDownloader
class. Currently, there are only two downloader, SequenceDownloader
and AsyncParallelDownloader
. AsyncParallelDownloader
is default downloader.
When the file being downloaded changes.
See Handling-Events.
When the progress of the file currently being downloaded changes.
See Handling-Events.
Download all files.
Download files sequentially.
Download files in parallel.
In this class, The progress of ChangeProgress
means (received bytes) / (the sum of the byte sizes of All files to download) * 100
Same as new AsyncParallelDownloader(10)
Limit the max number of parallelism.
var launcher = new CMLauncher(new MinecraftPath());
// Use SequenceDownloader
launcher.Downloader = new SequenceDownloader();
// Use AsyncParallelDownloader with limiting max parallelism number to 5
launcher.Downloader = new AsyncParallelDownloader(5);
Make implementation of IDownloader
.
Represent file that requires to be downloaded.
Type: MFile
Type: string
Type: string
Type: string
Type: long
Type: Func<Task>[]
The list of work to do after download was completed.
Return true
if Path
property is same.