/// <summary>
 /// Initializes a new instance of the <see cref="SendWelcomeEmailOnUserCreatedIntegrationEventHandler"/> class.
 /// </summary>
 /// <param name="userRepository">The user repository.</param>
 /// <param name="emailNotificationService">The email notification service.</param>
 public SendWelcomeEmailOnUserCreatedIntegrationEventHandler(
     IUserRepository userRepository,
     IEmailNotificationService emailNotificationService)
 {
     _emailNotificationService = emailNotificationService;
     _userRepository           = userRepository;
 }
Example #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="NotifyUserOnPasswordChangedIntegrationEventHandler"/> class.
 /// </summary>
 /// <param name="userRepository">The user repository.</param>
 /// <param name="emailNotificationService">The email notification service.</param>
 public NotifyUserOnPasswordChangedIntegrationEventHandler(
     IUserRepository userRepository,
     IEmailNotificationService emailNotificationService)
 {
     _emailNotificationService = emailNotificationService;
     _userRepository           = userRepository;
 }
Example #3
0
 public EmailTemplatesController(ICoreOrderService orderService, IPropertyService propertyService, IAccountServices accountServices, ILookupServices lookupServices,
                                 IEmailNotificationService emailNotificationService, EmailServices emailServices)
     : base(orderService, propertyService, accountServices, lookupServices)
 {
     _emailNotificationService = emailNotificationService;
     _emailServices            = emailServices;
 }
 public SendScoreAlertsService(
     IEmailNotificationService emailNotificationService,
     IProcessControlWrapper processControlWrapper)
 {
     this.emailNotificationService = emailNotificationService;
     this.processControlWrapper    = processControlWrapper;
 }
Example #5
0
 public EmailNotificationSender(IEmailNotificationService sender,
                                IMessageFactory <IEmailNotification> messageFactory,
                                IMessageValidatorProvider validatorProvider,
                                ILoggerFactory loggerFactory) : base(messageFactory, validatorProvider, loggerFactory)
 {
     _sender = sender;
 }
 public SubscriptionService(NotificationContext context, INotificationService notificationService, IEmailNotificationService emailNotificationService, IOptionsMonitor <SenderConfig> senderConfig, IMapper mapper)
 {
     m_context                  = context;
     m_notificationService      = notificationService;
     m_emailNotificationService = emailNotificationService;
     m_senderConfig             = senderConfig.CurrentValue;
     m_mapper = mapper;
 }
Example #7
0
 public OrderService(
     PaymentServiceFactory factory,
     IEmailNotificationService emailNotificationService,
     IInventory inventory)
 {
     this.factory = factory;
     this.emailNotificationService = emailNotificationService;
     this.inventory = inventory;
 }
Example #8
0
 public CharityEventController(
     IEmailNotificationService emailNotificationService,
     ICharityEventService charityEventService,
     ICharityService charityService)
 {
     this.emailNotificationService = emailNotificationService;
     this.charityEventService      = charityEventService;
     this.charityService           = charityService;
 }
Example #9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DiagnosticController"/> class.
 /// </summary>
 /// <param name="env">The environment.</param>
 /// <param name="diagnosticClient">Diagnostic client.</param>
 /// <param name="emailNotificationService">Email notification service.</param>
 public DiagnosticController(IHostingEnvironment env, IDiagnosticClientService diagnosticClient, IEmailNotificationService emailNotificationService, IConfiguration configuration)
 {
     Env = env;
     DiagnosticClient         = diagnosticClient;
     EmailNotificationService = emailNotificationService;
     blackListedAscRegions    = configuration.GetValue <string>("BlackListedAscRegions", string.Empty).Replace(" ", string.Empty).Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
     diagAscHeaderValue       = configuration.GetValue <string>("DiagAscHeaderValue");
     this.config = configuration;
 }
Example #10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="NotifyAttendeesOnGroupEventDateAndTimeChangedIntegrationEventHandler"/> class.
 /// </summary>
 /// <param name="groupEventRepository">The group event repository.</param>
 /// <param name="attendeeRepository">The attendee repository.</param>
 /// <param name="emailNotificationService">The email notification service.</param>
 public NotifyAttendeesOnGroupEventDateAndTimeChangedIntegrationEventHandler(
     IGroupEventRepository groupEventRepository,
     IAttendeeRepository attendeeRepository,
     IEmailNotificationService emailNotificationService)
 {
     _groupEventRepository     = groupEventRepository;
     _attendeeRepository       = attendeeRepository;
     _emailNotificationService = emailNotificationService;
 }
Example #11
0
        private IEmailNotificationService GetServiceClient()
        {
            BasicHttpBinding binding = new BasicHttpBinding();
            var                       emailNotificationService = ConfigurationManager.AppSettings["EmailNotificationService"];
            EndpointAddress           endpoint = new EndpointAddress(emailNotificationService);
            IEmailNotificationService client   = ChannelFactory <IEmailNotificationService> .CreateChannel(binding, endpoint);

            return(client);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="NotifyUserOnFriendshipRequestSentIntegrationEventHandler"/> class.
 /// </summary>
 /// <param name="friendshipRequestRepository">The friendship request repository.</param>
 /// <param name="userRepository">The user repository.</param>
 /// <param name="emailNotificationService">The email notification service.</param>
 public NotifyUserOnFriendshipRequestSentIntegrationEventHandler(
     IFriendshipRequestRepository friendshipRequestRepository,
     IUserRepository userRepository,
     IEmailNotificationService emailNotificationService)
 {
     _friendshipRequestRepository = friendshipRequestRepository;
     _userRepository           = userRepository;
     _emailNotificationService = emailNotificationService;
 }
Example #13
0
        public NotificationService(IConfiguration configuration, ILogger <NotificationService> logger)
        {
            _configuration = configuration;
            _logger        = logger;

            // connection string from configuration
            var smtpConnectionString = _configuration[SMTPServerConfig.CONFIG_NAME];

            // email service
            _emailService = new EmailNotificationService(new SMTPServerConfig(smtpConnectionString));
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="EmailNotificationsConsumer"/> class.
 /// </summary>
 /// <param name="notificationRepository">The notification repository.</param>
 /// <param name="unitOfWork">The unit of work.</param>
 /// <param name="dateTime">The date and time.</param>
 /// <param name="emailNotificationService">The email notification service.</param>
 public EmailNotificationsConsumer(
     INotificationRepository notificationRepository,
     IUnitOfWork unitOfWork,
     IDateTime dateTime,
     IEmailNotificationService emailNotificationService)
 {
     _notificationRepository = notificationRepository;
     _unitOfWork             = unitOfWork;
     _dateTime = dateTime;
     _emailNotificationService = emailNotificationService;
 }
 private RequisitionManagementService()
 {
     requisitionRepo          = RequisitionRepo.Instance;
     requisitionDetailRepo    = RequisitionDetailRepo.Instance;
     employeeRepo             = EmployeeRepo.Instance;
     adjustmentVoucherRepo    = AdjustmentVoucherRepo.Instance;
     stationeryRepo           = StationeryRepo.Instance;
     purchaseOrderRepo        = PurchaseOrderRepo.Instance;
     purchaseOrderDetailRepo  = PurchaseOrderDetailRepo.Instance;
     emailNotificationService = EmailNotificationService.Instance;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="NotifyEventOwnerOnInvitationAcceptedIntegrationEventHandler"/> class.
 /// </summary>
 /// <param name="invitationRepository">The invitation repository.</param>
 /// <param name="groupEventRepository">The group event repository.</param>
 /// <param name="userRepository">The user repository.</param>
 /// <param name="emailNotificationService">The email notification service.</param>
 public NotifyEventOwnerOnInvitationAcceptedIntegrationEventHandler(
     IInvitationRepository invitationRepository,
     IGroupEventRepository groupEventRepository,
     IUserRepository userRepository,
     IEmailNotificationService emailNotificationService)
 {
     _invitationRepository     = invitationRepository;
     _groupEventRepository     = groupEventRepository;
     _userRepository           = userRepository;
     _emailNotificationService = emailNotificationService;
 }
Example #17
0
 /// <summary>
 /// Initializes a new instance of the <see cref="NotifyAttendeeOnAttendeeCreatedIntegrationEventHandler"/> class.
 /// </summary>
 /// <param name="attendeeRepository">The attendee repository.</param>
 /// <param name="groupEventRepository">The group event repository.</param>
 /// <param name="userRepository">The user repository.</param>
 /// <param name="emailNotificationService">The email notification service.</param>
 public NotifyAttendeeOnAttendeeCreatedIntegrationEventHandler(
     IAttendeeRepository attendeeRepository,
     IGroupEventRepository groupEventRepository,
     IUserRepository userRepository,
     IEmailNotificationService emailNotificationService)
 {
     _emailNotificationService = emailNotificationService;
     _attendeeRepository       = attendeeRepository;
     _groupEventRepository     = groupEventRepository;
     _userRepository           = userRepository;
 }
 public EventNotificationController(IEventNotificationQueryService eventNotificationQueryService, 
     IEmailNotificationService emailNotificationService, 
     ICharityEventService charityEventService, 
     IUserService userService, 
     ICharityService charityService)
 {
     _eventNotificationQueryService = eventNotificationQueryService;
     _emailNotificationService = emailNotificationService;
     _charityEventService = charityEventService;
     _userService = userService;
     _charityService = charityService;
 }
 private RequisitionCatalogueService()
 {
     cartDetailRepo           = CartDetailRepo.Instance;
     stationeryRepo           = StationeryRepo.Instance;
     requisitionRepo          = RequisitionRepo.Instance;
     requisitionDetailRepo    = RequisitionDetailRepo.Instance;
     adjustmentVoucherRepo    = AdjustmentVoucherRepo.Instance;
     employeeRepo             = EmployeeRepo.Instance;
     purchaseOrderDetailRepo  = PurchaseOrderDetailRepo.Instance;
     emailNotificationService = EmailNotificationService.Instance;
     disbursementRepo         = DisbursementRepo.Instance;
 }
 public ClientsController(
     IUserService userService,
     IEmailNotificationService emailNotificationService,
     ICompanyService companyService,
     IPendingClientService pendingClientService,
     IMapper mapper)
 {
     _userService = userService;
     _emailNotificationService = emailNotificationService;
     _companyService           = companyService;
     _pendingClientService     = pendingClientService;
     _mapper = mapper;
 }
Example #21
0
 public ClientsController(
     IUserService userService,
     IEmailNotificationService emailNotificationService,
     ICompanyService companyService,
     IPendingClientService pendingClientService,
     IMapper mapper)
 {
     _userService = userService;
     _emailNotificationService = emailNotificationService;
     _companyService = companyService;
     _pendingClientService = pendingClientService;
     _mapper = mapper;
 }
Example #22
0
 public CommentsController(ICommentService commentService,
                           IMapper mapper,
                           IUserAvatarProvider userAvatarProvider,
                           IProjectService projectService,
                           IUserService userService,
                           IEmailNotificationService notificationService)
 {
     _commentService      = commentService;
     _mapper              = mapper;
     _userAvatarProvider  = userAvatarProvider;
     _projectService      = projectService;
     _userService         = userService;
     _notificationService = notificationService;
 }
Example #23
0
 public CommentsController(ICommentService commentService,
     IMapper mapper,
     IUserAvatarProvider userAvatarProvider,
     IProjectService projectService,
     IUserService userService,
     IEmailNotificationService notificationService)
 {
     _commentService = commentService;
     _mapper = mapper;
     _userAvatarProvider = userAvatarProvider;
     _projectService = projectService;
     _userService = userService;
     _notificationService = notificationService;
 }
Example #24
0
        public EmailNotificationsController(
            IRegistrationRetrievalService registrationRetrievalService,
            IEmailNotificationService emailNotificationService,
            ILogger <EmailNotificationsController> logger)
        {
            _registrationRetrievalService = registrationRetrievalService ?? throw
                                                new ArgumentNullException(nameof(registrationRetrievalService));

            _emailNotificationService = emailNotificationService ?? throw
                                            new ArgumentNullException(nameof(emailNotificationService));

            _logger = logger ?? throw
                          new ArgumentNullException(nameof(logger));
        }
 public PurchaseOrderErrorResponseHandler(
     EFContext efContext,
     IApprovalService approvalService,
     ILogger logger,
     IEmailNotificationService emailNotificationService,
     ISupportNotificationService supportNotificationService
     )
 {
     _efContext                  = efContext;
     _approvalService            = approvalService;
     _logger                     = logger;
     _supportNotificationService = supportNotificationService;
     _emailNotificationService   = emailNotificationService;
 }
 public IpSessionController(
     IUserService userService,
     IAuthenticationService authenticationService,
     ITokenDataExtractorFactory tokenDataExtractorFactory,
     IProductIdExtractor productIdExtractor,
     IEmailNotificationService emailNotificationService,
     ISocialNetworkNotificationFactory notificationFactory)
 {
     _userService = userService;
     _authenticationService = authenticationService;
     _tokenDataExtractorFactory = tokenDataExtractorFactory;
     _productIdExtractor = productIdExtractor;
     _emailNotificationService = emailNotificationService;
     _notificationFactory = notificationFactory;
 }
 public IpSessionController(
     IUserService userService,
     IAuthenticationService authenticationService,
     ITokenDataExtractorFactory tokenDataExtractorFactory,
     IProductIdExtractor productIdExtractor,
     IEmailNotificationService emailNotificationService,
     ISocialNetworkNotificationFactory notificationFactory)
 {
     _userService               = userService;
     _authenticationService     = authenticationService;
     _tokenDataExtractorFactory = tokenDataExtractorFactory;
     _productIdExtractor        = productIdExtractor;
     _emailNotificationService  = emailNotificationService;
     _notificationFactory       = notificationFactory;
 }
Example #28
0
 public AbuseController(ICassandraStatisticsService cassandraStatisticsService,
                        IWatchProjectService watchProjectService,
                        IProjectService projectService,
                        IProjectAbuseService projectAbuseService,
                        IUserService userService,
                        IEmailNotificationService emailNotificationService,
                        IMapper mapper)
 {
     _cassandraStatisticsService = cassandraStatisticsService;
     _watchProjectService        = watchProjectService;
     _projectService             = projectService;
     _projectAbuseService        = projectAbuseService;
     _userService = userService;
     _emailNotificationService = emailNotificationService;
     _mapper = mapper;
 }
Example #29
0
 public AbuseController(ICassandraStatisticsService cassandraStatisticsService,
     IWatchProjectService watchProjectService,
     IProjectService projectService,
     IProjectAbuseService projectAbuseService,
     IUserService userService,
     IEmailNotificationService emailNotificationService,
     IMapper mapper)
 {
     _cassandraStatisticsService = cassandraStatisticsService;
     _watchProjectService = watchProjectService;
     _projectService = projectService;
     _projectAbuseService = projectAbuseService;
     _userService = userService;
     _emailNotificationService = emailNotificationService;
     _mapper = mapper;
 }
Example #30
0
 public ProfileController(
     IUserService userService,
     IAuthenticationService authenticationService,
     IEmailNotificationService emailNotificationService,
     IPasswordService passwordService,
     IProductIdExtractor productIdExtractor,
     IUserAvatarProvider avatarProvider,
     IMapper mapper)
 {
     _userService = userService;
     _authenticationService = authenticationService;
     _emailNotificationService = emailNotificationService;
     _passwordService = passwordService;
     _productIdExtractor = productIdExtractor;
     _avatarProvider = avatarProvider;
     _mapper = mapper;
 }
Example #31
0
        /// <summary>
        /// Initializes a new instance of the <see cref="DiagnosticController"/> class.
        /// </summary>
        /// <param name="env">The environment.</param>
        /// <param name="diagnosticClient">Diagnostic client.</param>
        /// <param name="emailNotificationService">Email notification service.</param>
        public DiagnosticController(IHostingEnvironment env, IDiagnosticClientService diagnosticClient, IEmailNotificationService emailNotificationService, IConfiguration configuration, IResourceConfigService resConfigService, IAppSvcUxDiagnosticDataService appSvcUxDiagnosticDataService)
        {
            Env = env;
            DiagnosticClient         = diagnosticClient;
            EmailNotificationService = emailNotificationService;
            forbiddenAscRegions      = configuration.GetValue <string>("ForbiddenAscRegions", string.Empty).Replace(" ", string.Empty).Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
            if (!forbiddenAscRegions.Any())
            {
                // will remove once production config is updated to use the more racially neutral term `ForbiddenAscRegions`
                forbiddenAscRegions = configuration.GetValue <string>("BlackListedAscRegions", string.Empty).Replace(" ", string.Empty).Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
            }

            forbiddenDiagAscHeaderValue = configuration.GetValue <string>("DiagAscHeaderValue");
            this.config = configuration;
            this.resourceConfigService    = resConfigService;
            AppSvcUxDiagnosticDataService = appSvcUxDiagnosticDataService;
        }
 public ProfileController(
     IUserService userService,
     IAuthenticationService authenticationService,
     IEmailNotificationService emailNotificationService,
     IPasswordService passwordService,
     IProductIdExtractor productIdExtractor,
     IUserAvatarProvider avatarProvider,
     IMapper mapper)
 {
     _userService              = userService;
     _authenticationService    = authenticationService;
     _emailNotificationService = emailNotificationService;
     _passwordService          = passwordService;
     _productIdExtractor       = productIdExtractor;
     _avatarProvider           = avatarProvider;
     _mapper = mapper;
 }
Example #33
0
 public ProjectsController(
     IProjectService projectService,
     IExternalVideoService externalVideoService,
     IProjectAvsxService projectAvsxService,
     IProjectScreenshotService projectScreenshotService,
     IEmailNotificationService emailNotificationService,
     IProjectUriProvider projectUriProvider,
     IProductIdExtractor productIdExtractor)
 {
     _projectService           = projectService;
     _externalVideoService     = externalVideoService;
     _projectAvsxService       = projectAvsxService;
     _projectScreenshotService = projectScreenshotService;
     _emailNotificationService = emailNotificationService;
     _projectUriProvider       = projectUriProvider;
     _productIdExtractor       = productIdExtractor;
 }
Example #34
0
 public ProjectsController(
     IProjectService projectService,
     IExternalVideoService externalVideoService,
     IProjectAvsxService projectAvsxService,
     IProjectScreenshotService projectScreenshotService,
     IEmailNotificationService emailNotificationService,
     IProjectUriProvider projectUriProvider,
     IProductIdExtractor productIdExtractor)
 {
     _projectService = projectService;
     _externalVideoService = externalVideoService;
     _projectAvsxService = projectAvsxService;
     _projectScreenshotService = projectScreenshotService;
     _emailNotificationService = emailNotificationService;
     _projectUriProvider = projectUriProvider;
     _productIdExtractor = productIdExtractor;
 }
Example #35
0
 public PgPurchaseOrderResponseConsumer(EFContext efContext,
                                        ICustomObjectDataService customDataService,
                                        IMapper mapper,
                                        IApprovalService approvalService,
                                        IEmailNotificationService emailNotificationService,
                                        ICostActionService costActionService,
                                        IEventService eventService,
                                        IPgPaymentService pgPaymentService,
                                        IActivityLogService activityLogService)
 {
     _efContext                = efContext;
     _customDataService        = customDataService;
     _mapper                   = mapper;
     _approvalService          = approvalService;
     _emailNotificationService = emailNotificationService;
     _costActionService        = costActionService;
     _eventService             = eventService;
     _pgPaymentService         = pgPaymentService;
     _activityLogService       = activityLogService;
 }
        public BillingEventHandler(
            IBillingEventService billingEventService,
            IBalanceService balanceService,
            IBillingChargeService billingChargeService,
            IBillingEventLogService billingEventLogService,
            ICompanyService companyService,
            IEmailNotificationService notificationService)
        {
            _billingEventService = billingEventService;
            _balanceService = balanceService;
            _billingChargeService = billingChargeService;
            _billingEventLogService = billingEventLogService;
            _companyService = companyService;
            _notificationService = notificationService;

            _eventHandlers = new Dictionary<EventType, Func<DomainEvent, Task>>
            {
                { EventType.ChargeFailed, ChargeFailedAsync },
                { EventType.ChargeRefunded, ChargeRefundedAsync },
                { EventType.ChargeSucceeded, ChargeSucceededAsync },
            };
        }
Example #37
0
        public void Setup()
        {
            Context.Notifications.AddRange(NotificationFaker.Generate());
            Context.SaveChanges();
            m_notificationService = new NotificationService(Context, Mapper);



            Mock <IOptionsMonitor <SenderConfig> > mockSenderConfig = new Mock <IOptionsMonitor <SenderConfig> >();

            mockSenderConfig.Setup(x => x.CurrentValue).Returns(new SenderConfig {
                Email = m_eamil, Name = m_name, Password = m_password
            });

            Mock <IEmailSenderService> mockSenderService = new Mock <IEmailSenderService>();

            mockSenderService.Setup(x => x.SendEmailAsync(It.IsAny <SendEmailRequest>(), It.Is <SenderConfig>((config) => config.Email == m_eamil &&
                                                                                                              config.Name == m_name &&
                                                                                                              config.Password == m_password))).Returns(Task.FromResult(false));

            m_emailNotificationService = new EmailNotificationService(Context, mockSenderService.Object, Mapper, mockSenderConfig.Object);
        }
Example #38
0
 public AccountController(
     IAuthenticationService authenticationService,
     IUserService userService,
     IEmailNotificationService emailNotificationService,
     IPortalFrontendSettings settings,
     ITokenDataExtractorFactory tokenDataExtractorFactory,
     ISocialNetworkNotificationFactory notificationFactory,
     IProductIdExtractor productIdExtractor,
     IPendingClientService pendingClientService,
     IPasswordService passwordService,
     ICompanyService companyService)
     : base(settings)
 {
     _emailNotificationService = emailNotificationService;
     _tokenDataExtractorFactory = tokenDataExtractorFactory;
     _notificationFactory = notificationFactory;
     _productIdExtractor = productIdExtractor;
     _pendingClientService = pendingClientService;
     _passwordService = passwordService;
     _companyService = companyService;
     _authenticationService = authenticationService;
     _userService = userService;
 }
 public InvitationCreationController(IDocumentSession session, IFindMembers members, IEmailNotificationService email)
 {
     _session = session;
     _members = members;
     _email = email;
 }
 public InvitationAcceptanceController(IDocumentSession session, IEmailNotificationService email, IAuthentication authentication)
 {
     _session = session;
     _email = email;
     _authentication = authentication;
 }
 public FeedbackController(IMaxiKioscosUow uow, ITicketErrorNegocio ticketErrorNegocio, IEmailNotificationService notificationService)
 {
     _notificationService = notificationService;
     TicketErrorNegocio = ticketErrorNegocio;
     Uow = uow;
 }