Ejemplo n.º 1
0
        private static void DownloadAndSaveFile(ApiResponse enhancedApiResponse, string file,
                                                ActionConfiguration actionConfiguration)
        {
            var outputFolder = Directory.CreateDirectory(actionConfiguration.Output());

            using var webClient = new WebClient();
            // ReSharper disable once MethodHasAsyncOverload
            webClient.DownloadFile(new Uri(enhancedApiResponse.Output_url),
                                   $"{outputFolder}/output_{Path.GetFileName(file)}");
        }