private async Task <string> FetchAndWriteToDisk(string key) { var ret = await HttpClientFactory.FetchAsync(key); var fi = MD5HashedFi(key); if (fi.Exists) { fi.Delete(); } await File.WriteAllTextAsync(fi.FullName, ret, Encoding.UTF8); return(ret); }
private async Task <string> FetchAndWriteToDisk(string key) { var ret = await HttpClientFactory.FetchAsync(key); var fi = MD5HashedFi(key); if (fi.Exists) { fi.Delete(); } await File.WriteAllTextAsync(fi.FullName, ret, Encoding.UTF8); return(ret); }