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"); } } }
public Task Handle(Navigated notification, CancellationToken cancellationToken) => Task.Factory.StartNew(() => pageHost.SetPage(notification.ViewModelName));