Exemplo n.º 1
0
 public async Task<byte[]> DownloadAsync(Uri uri, ITransferProgress progress) {
     using (var tmpFile = new TmpFileCreated()) {
         await _downloader.DownloadAsync(uri, tmpFile.FilePath, progress).ConfigureAwait(false);
         return File.ReadAllBytes(tmpFile.FilePath.ToString());
     }
 }
Exemplo n.º 2
0
 public byte[] Download(Uri uri) {
     using (var tmpFile = new TmpFileCreated()) {
         _downloader.Download(uri, tmpFile.FilePath);
         return File.ReadAllBytes(tmpFile.FilePath.ToString());
     }
 }
Exemplo n.º 3
0
 public byte[] Download(Uri uri, ITransferProgress progress) {
     using (var tmpFile = new TmpFileCreated()) {
         _downloader.Download(uri, tmpFile.FilePath, progress);
         return File.ReadAllBytes(tmpFile.FilePath.ToString());
     }
 }
 public async Task<string> DownloadAsync(Uri uri) {
     using (var tmpFile = new TmpFileCreated()) {
         await _downloader.DownloadAsync(uri, tmpFile.FilePath).ConfigureAwait(false);
         return File.ReadAllText(tmpFile.FilePath.ToString());
     }
 }