コード例 #1
0
 public async Task DownloadFileAsync(string remoteFile, IAbsoluteDirectoryPath destinationPath,
                                     IReadOnlyCollection <Uri> remotes, CancellationToken token, int limit,
                                     Func <IAbsoluteFilePath, bool> confirmValidity)
 {
     using (var scoreMirrorSelector = _createMirrorSelectorWithLimit(limit, remotes)) {
         await
         DownloadFileAsync(remoteFile, destinationPath, scoreMirrorSelector.Value, token, confirmValidity,
                           RepositoryRemote.CalculateHttpFallbackAfter(limit))
         .ConfigureAwait(false);
     }
 }
コード例 #2
0
 public Task DownloadFileAsync(string remoteFile, IAbsoluteDirectoryPath destinationPath,
                               IMirrorSelector selector, int limit, CancellationToken token)
 => DownloadFileAsync(remoteFile, destinationPath, selector, token, x => true,
                      RepositoryRemote.CalculateHttpFallbackAfter(limit));