예제 #1
0
        private Task <Chunk> DownloadChunk(Chunk chunk, CancellationToken token)
        {
            ChunkDownloader chunkDownloader = new ChunkDownloader(chunk, Package.Options);

            chunkDownloader.DownloadProgressChanged += OnChunkDownloadProgressChanged;
            return(chunkDownloader.Download(_requestInstance, token));
        }
예제 #2
0
        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);
        }