Ejemplo n.º 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));
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 3
0
 private IEnumerable<Chat> DownloadChunk(ChunkDownloader chunk)
 {
     var ret = chunk.DownloadChunk().ToList();
     Console.WriteLine("Downloaded chunk");
     return ret;
 }