/// <summary> /// Download the nupkg to a folder. /// </summary> protected async Task <FileInfo> DownloadNupkgAsync(string outputDirectory, DownloadMode mode, DateTimeOffset date, CancellationToken token) { using (var stream = await GetNupkgAsync(token)) { var path = new FileInfo(Path.Combine(outputDirectory, $"{FileBaseName}.nupkg")); await CatalogReaderUtility.DownloadFileAsync(stream, path, date, mode, token); return(path); } }
/// <summary> /// Download the nuspec to a directory. /// </summary> public async Task <FileInfo> DownloadNuspecAsync(string outputDirectory, DownloadMode mode, CancellationToken token) { using (var stream = await GetNupkgAsync(token)) { var path = new FileInfo(Path.Combine(outputDirectory, $"{FileBaseName}.nuspec".ToLowerInvariant())); await CatalogReaderUtility.DownloadFileAsync(stream, path, CommitTimeStamp, mode, token); return(path); } }