public async Task <IActionResult> VerifyEmailAddress(VerifyEmailAddressCommand command) { var result = await mediator.Send(command); if (result.Success) { return(RedirectToAction("Index")); } throw new Exception("Failed to verify"); }
public Task<VerifyEmailAddressResponse> VerifyEmailAddress(string address) { var cmd = new VerifyEmailAddressCommand { EmailAddress = address }; return _processor.CreateTask(cmd, new VerifyEmailAddressResponseParser()); //new VerifierEmailAddressCommandResponseParser(); }
public void VerifyTest() { var cmd = new VerifyEmailAddressCommand { EmailAddress = Helper.GetSenderEmailAddress() }; var cp = new CommandProcessor(_builder); var resp = cp.Process(cmd, _parser); Console.WriteLine(resp.Command + " : ID " + resp.RequestID); }