コード例 #1
0
 public async Task Handle(ChipPlayed notification, CancellationToken cancellationToken)
 {
     if (IsValidPlay(notification))
     {
         try
         {
             await gameService.PlayAsync(notification.GameId, notification.Row, notification.Column);
         }
         catch (GameNotFoundException gnfEx)
         {
             //Improve this
             pageHost.SetPage("WelcomeViewModel");
         }
     }
 }
コード例 #2
0
 public Task Handle(Navigated notification, CancellationToken cancellationToken) =>
 Task.Factory.StartNew(() => pageHost.SetPage(notification.ViewModelName));