Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
TourDataManager
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill
TourDataManager
Commits
1ea772d6
Commit
1ea772d6
authored
Oct 15, 2018
by
Kirill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ContentLoadingTask возвращает IProgress при запуске
parent
419ec5b0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
ContentLoadingTask.cs
TourDataManager/ContentLoadingTask.cs
+3
-2
No files found.
TourDataManager/ContentLoadingTask.cs
View file @
1ea772d6
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment