// This function just tries to clean up any previous registartions for unit testing. async Task ResetTestAsync() { try { await MAS.StartAsync(); if (MASDevice.Current?.IsRegistered == true) { await MASDevice.Current?.UnregisterAsync(); } } catch { } await MAS.ResetAsync(); }
private async void ResetBtn_Click(object sender, Windows.UI.Xaml.RoutedEventArgs e) { App.IsBusy = true; try { await MAS.ResetAsync(); ((App)App.Current).NavigateNoRegister(); } catch (Exception exp) { ErrorText.Text = exp.ToString(); } App.IsBusy = false; }