private Task <Chunk> DownloadChunk(Chunk chunk, CancellationToken token) { ChunkDownloader chunkDownloader = new ChunkDownloader(chunk, Package.Options); chunkDownloader.DownloadProgressChanged += OnChunkDownloadProgressChanged; return(chunkDownloader.Download(_requestInstance, token)); }
private async Task <Chunk> DownloadChunk(Chunk chunk, CancellationToken token) { ChunkDownloader chunkDownloader = new ChunkDownloader(chunk, Package.Options); chunkDownloader.DownloadProgressChanged += OnChunkDownloadProgressChanged; await chunkDownloader.Download(_requestInstance, Package.Options.MaximumSpeedPerChunk, token); return(chunk); }