Commit 1ea772d6 authored by Kirill's avatar Kirill

ContentLoadingTask возвращает IProgress при запуске

parent 419ec5b0
...@@ -16,7 +16,7 @@ namespace TourDataManager { ...@@ -16,7 +16,7 @@ namespace TourDataManager {
} }
public void Run(){ public void Run(IProgress<string> progress = null){
Debug.Log($"ContentLoadingTask.Run(){{ tourId = {tourId} }}"); Debug.Log($"ContentLoadingTask.Run(){{ tourId = {tourId} }}");
var files = filesFetcher.FetchFilesAsync(tourId).Result; var files = filesFetcher.FetchFilesAsync(tourId).Result;
...@@ -27,7 +27,8 @@ namespace TourDataManager { ...@@ -27,7 +27,8 @@ namespace TourDataManager {
var len = files.Length; var len = files.Length;
var count = 0; var count = 0;
foreach (var file in files){ foreach (var file in files){
Debug.Log($"{++count} of {len} | {file.LocalUrl}"); //Debug.Log($"{++count} of {len} | {file.LocalUrl}");
progress?.Report($"{++count} of {len} | {file.LocalUrl}");
var dir = Path.GetDirectoryName(file.LocalUrl); var dir = Path.GetDirectoryName(file.LocalUrl);
if (!Directory.Exists(dir)) Directory.CreateDirectory(dir); if (!Directory.Exists(dir)) Directory.CreateDirectory(dir);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment