Esempio n. 1
0
 private async Task ChangeEmailAsync()
 {
     try
     {
         await ButtonChangeEmail.SpinAsync(async() =>
         {
             await ApplicationUserService.ChangeEmailAsync(ChangeEmailModel);
             await ToastService.ShowToastAsync("Email confirmation sent.", ToastType.Success);
         });
     }
     catch (HESException ex)
     {
         ValidationErrorMessage.DisplayError(nameof(ChangeEmailModel.NewEmail), ex.Message);
     }
     catch (Exception ex)
     {
         Logger.LogError(ex.Message);
         await ToastService.ShowToastAsync(ex.Message, ToastType.Error);
     }
 }