Ejemplo n.º 1
0
 public AccountController(
     ILoginService loginService,
     ILogoutService logoutService,
     IPasswordResetCallback passwordResetCallback,
     IPasswordService passwordService,
     DisabledErrorMessageSettings disabledErrorMessageSettings,
     PublicBrowseSettings publicBrowseSettings)
 {
     this.loginService                 = loginService;
     this.logoutService                = logoutService;
     this.passwordResetCallback        = passwordResetCallback;
     this.passwordService              = passwordService;
     this.disabledErrorMessageSettings = disabledErrorMessageSettings;
     this.publicBrowseSettings         = publicBrowseSettings;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RegistrationService"/> class using
 /// the provided <paramref name="emailService"/> and <paramref name="settings"/>.
 /// </summary>
 /// <param name="emailService">The service to use to send e-mails.</param>
 /// <param name="passwordResetCallback">The instance that will supply the reset callback URL.</param>
 /// <param name="settings">The configured registration settings.</param>
 /// <exception cref="ArgumentNullException"><paramref name="emailService"/> is <see langref="null"/>.</exception>
 /// <exception cref="ArgumentNullException"><paramref name="passwordResetCallback"/> is <see langref="null"/>.</exception>
 /// <exception cref="ArgumentNullException"><paramref name="settings"/> is <see langref="null"/>.</exception>
 public RegistrationService(IEmailService emailService, IPasswordResetCallback passwordResetCallback, RegistrationSettings settings)
 {
     _emailService          = emailService ?? throw new ArgumentNullException(nameof(emailService));
     _passwordResetCallback = passwordResetCallback ?? throw new ArgumentNullException(nameof(passwordResetCallback));
     _settings = settings ?? throw new ArgumentNullException(nameof(settings));
 }