Example #1
0
 public static async Task DownLoadFiles(this IDownloadService downloadService, params DownloadInfo[] downloadInfos)
 {
     foreach (var downloadInfo in downloadInfos)
     {
         await downloadService.DownLoadFile(downloadInfo);
     }
 }
Example #2
0
 public static Task DownLoadFile(this IDownloadService downloadService, string fileUrl, string LocalFilePath, long fileSize, string fileHash)
 {
     return(downloadService.DownLoadFile(new DownloadInfo
     {
         FileSize = fileSize,
         FileHash = fileHash,
         FileUrl = fileUrl,
         LocalFilePath = LocalFilePath,
     }));
 }