public ConfirmationService(
            IUserRepository userRepository,
            IMailer mailer,
            IValidationRequestsRepository validationRequestsRepository, 
            IEventSink userManagementEventSink, 
            ConfirmationSettings confirmationSettings, 
            IGitlabUserRegistrar gitlabUserRegistrar, 
            IRedmineUserRegistrar redmineUserRegistrar)
        {
            Require.NotNull(userRepository, nameof(userRepository));
            Require.NotNull(mailer, nameof(mailer));
            Require.NotNull(validationRequestsRepository, nameof(validationRequestsRepository));
            Require.NotNull(userManagementEventSink, nameof(userManagementEventSink));
            Require.NotNull(confirmationSettings, nameof(confirmationSettings));
            Require.NotNull(gitlabUserRegistrar, nameof(gitlabUserRegistrar));
            Require.NotNull(redmineUserRegistrar, nameof(redmineUserRegistrar));

            _userRepository = userRepository;
            _mailer = mailer;
            _validationRequestsRepository = validationRequestsRepository;
            _userManagementEventSink = userManagementEventSink;
            _confirmationSettings = confirmationSettings;
            _gitlabUserRegistrar = gitlabUserRegistrar;
            _redmineUserRegistrar = redmineUserRegistrar;
        }
Example #2
0
        public MailValidationHandler(IMailer mailer,
                                     IValidationRequestsRepository validationRequestsRepository,
                                     ConfirmationSettings confirmationSettings,
                                     IUserRepository userRepository,
                                     DatabaseSessionProvider databaseSessionProvider,
                                     IEventBus eventBus)
        {
            _mailer = mailer;
            _validationRequestsRepository = validationRequestsRepository;
            _confirmationSettings         = confirmationSettings;
            _userRepository          = userRepository;
            _databaseSessionProvider = databaseSessionProvider;
            _eventBus = eventBus;

            _validateMail validateMail = ValidateMail;

            _eventBus.SetConsumer("ValidateMail", validateMail);
        }
Example #3
0
        public ConfirmationService(
            IUserRepository userRepository,
            IMailer mailer,
            IValidationRequestsRepository validationRequestsRepository,
            IEventSink userManagementEventSink,
            ConfirmationSettings confirmationSettings,
            IEventBus eventBus)
        {
            Require.NotNull(userRepository, nameof(userRepository));
            Require.NotNull(mailer, nameof(mailer));
            Require.NotNull(validationRequestsRepository, nameof(validationRequestsRepository));
            Require.NotNull(userManagementEventSink, nameof(userManagementEventSink));
            Require.NotNull(confirmationSettings, nameof(confirmationSettings));

            _userRepository = userRepository;
            _mailer         = mailer;
            _validationRequestsRepository = validationRequestsRepository;
            _userManagementEventSink      = userManagementEventSink;
            _confirmationSettings         = confirmationSettings;
            _eventBus = eventBus;
        }