コード例 #1
0
        public async Task DownloadProjectResult(Guid projectId, string destinationPath)
        {
            Console.WriteLine("DownloadProjectResult: at the start");
            try
            {
                var response = await _httpClient.GetAsync($"api/Project/GetProjectOutputUri/{projectId}");

                response.EnsureSuccessStatusCode();
                var projectDownloadUri = await response.Content.ReadAsStringAsync();

                await _dataLoader.DownloadOutput(projectDownloadUri, destinationPath);

                Console.WriteLine("DownloadProjectResult: at the end");
            }
            catch (Exception ex)
            {
                Console.WriteLine($"DownloadProjectResult: {ex.Message}");
                throw ex;
            }
        }