Skip to content

Commit 307e509

Browse files
committed
add example for chaining TaskLoaderNotifier with others tasks
1 parent 5046359 commit 307e509

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Retronado/Sample/ViewModels/RetroGamesViewModel.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,14 @@ public override void OnNavigated(object parameter)
4141
Loader.Load(InitializeAsync);
4242
}
4343

44+
private async Task ChainTasks()
45+
{
46+
await Task.Delay(1000);
47+
// The TaskCompleted property will never raise an exception
48+
await Loader.CurrentLoadingTask.TaskCompleted;
49+
await Task.Delay(1000);
50+
}
51+
4452
private async Task<List<Game>> InitializeAsync()
4553
{
4654
var result = _platform == GamePlatform.Computer

0 commit comments

Comments
 (0)