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); } }
public Task DownloadFileAsync(string remoteFile, IAbsoluteDirectoryPath destinationPath, IMirrorSelector selector, int limit, CancellationToken token) => DownloadFileAsync(remoteFile, destinationPath, selector, token, x => true, RepositoryRemote.CalculateHttpFallbackAfter(limit));