public async Task <string> DownloadAndExtractAsync() { var req = RequestEngine.CreateClient(_AccessConfig); var gzipFilePath = await RequestEngine.DownloadFileAsync(req, XmlFileUrl, _AccessConfig.DownloadDirectory); var unzipFilePath = await GZipUtils.DecompressAsync(new FileInfo(gzipFilePath)); return(unzipFilePath); }
public async Task <string> DownloadAndExtractAsync(string xmlUrlPath, string saveFilePath = null) { var req = RequestEngine.CreateClient(_AccessConfig); var saveDirectoryPath = _AccessConfig.DownloadDirectory; if (!string.IsNullOrEmpty(saveFilePath)) { saveDirectoryPath = Path.GetDirectoryName(saveFilePath); } var gzipFilePath = await RequestEngine.DownloadFileToDirectoryAsync(req, xmlUrlPath, saveDirectoryPath); var unzipFilePath = await GZipUtils.DecompressAsync(new FileInfo(gzipFilePath), saveFilePath); return(unzipFilePath); }