private async Task SendVerificationCode() { try { IsBusy = true; string emailDuplicate = (await _contactManager.CheckIfEmailExists(EmailAddress, "HopePH")) ? EmailAddress : "*****@*****.**"; if (!IsVerification) { _validator = new EmailVerificationPageValidator(VerificationCode, IsVerification, emailDuplicate); } else { _validator = new EmailVerificationPageValidator(VerificationCode, IsVerification, emailDuplicate); } if (ProcessValidationErrors(_validator.Validate(this), true)) { await PrepareNavigationToRegistrationPage(IsVerification); } } catch (Exception ex) { ProcessErrorReportingForHockeyApp(ex); } finally { IsBusy = false; } }
private async void RequestVerificationCode() { try { IsBusy = true; string existingEmail = (await _contactManager.CheckIfEmailExists(EmailAddress, "HopePH")) ? EmailAddress : "*****@*****.**"; _validator = new RequestVerificationCodePageEmailValidator(EmailAddress, existingEmail); if (ProcessValidationErrors(_validator.Validate(this), true)) { VerificationCode = await _contactManager.SendVerificationCode(EmailAddress); PassingParameters.Add("VerificationCode", VerificationCode); PassingParameters.Add("EmailAddress", EmailAddress); NavigateToPageHelper(nameof(ViewNames.ConfirmVerificationCodePage), _navigationStackService, _navigationService, PassingParameters); } } catch (Exception ex) { ProcessErrorReportingForHockeyApp(ex); } }