private void SaveContentFile(HttpClient httpClient, Uri uri) { var response = httpClient.GetAsync(uri).Result; _logger.MakeLog($"Save file {uri.AbsoluteUri}"); _contentSaver.SaveFile(uri, response.Content.ReadAsStreamAsync().Result); }
private void ProcessFile(HttpClient httpClient, Uri uri) { logger.Log($"File founded: {uri}"); var response = httpClient.GetAsync(uri).Result; logger.Log($"File loaded: {uri}"); contentSaver.SaveFile(uri, response.Content.ReadAsStreamAsync().Result); }
private void ProcessFile(HttpClient httpClient, Uri uri) { if (!IsAcceptableUri(uri, _fileConstraints)) { return; } var response = httpClient.GetAsync(uri).Result; _contentSaver.SaveFile(uri, response.Content.ReadAsStreamAsync().Result); }
private void ProcessFile(HttpClient httpClient, Uri uri) { _logger.Log($"File founded: {uri}"); if (!IsAcceptableUri(uri, _fileConstraints)) { return; } var response = httpClient.GetAsync(uri).Result; _logger.Log($"File loaded: {uri}"); _contentSaver.SaveFile(uri, response.Content.ReadAsStreamAsync().Result); }