public MessageSendingActor(IEmailDeliveryService emailDeliveryService, Mapper mapper, int maxBatchSize) : base("MessageSendingActor") { _bulkEmailQueue = new BulkEmailQueue(Self, maxBatchSize); _emailDeliveryService = emailDeliveryService; _mapper = mapper; Command <SendEmailMsg>(HandleSendEmailMsg); Command <SendBatchEmailsMsg>(HandleSendBatchEmailsMsg); }
public EmailService( IEmailBuilder emailBuilder, IEmailDistributionService emailDistributionService, IEmailDeliveryService emailDeliveryService) { _emailBuilder = emailBuilder; _emailDistributionService = emailDistributionService; _emailDeliveryService = emailDeliveryService; }
/// <summary> /// Initializes a new instance of the <see cref="StartupServicesProvider"/> class. /// </summary> /// <param name="applicationSettings">Application settings.</param> /// <param name="settingsService">Setting service.</param> /// <param name="viewModelBuilder">View model builder.</param> /// <param name="emailDeliveryService">Email delivery service.</param> /// <param name="reminderService">Reminder service.</param> /// <param name="backupService">Backup service.</param> public StartupServicesProvider( IApplicationSettings applicationSettings, ISettingsService settingsService, IViewModelBuilder viewModelBuilder, IEmailDeliveryService emailDeliveryService, IReminderService reminderService, IBackupService backupService) { this.applicationSettings = applicationSettings; this.settingsService = settingsService; this.viewModelBuilder = viewModelBuilder; this.emailDeliveryService = emailDeliveryService; this.reminderService = reminderService; this.backupService = backupService; }
/// <summary> /// Initializes a new instance of the <see cref="NotificationGroupDialogViewModel"/> class. /// </summary> /// <param name="unitOfWork">Unit of work.</param> /// <param name="viewModelBuilder">View model builder.</param> /// <param name="viewBuilder">View builder.</param> /// <param name="resourceHandler">Resource handler.</param> /// <param name="messageBoxProvider">Message box provider.</param> /// <param name="emailDeliveryService">Email delivery service.</param> public NotificationGroupDialogViewModel( IUnitOfWork unitOfWork, IViewModelBuilder viewModelBuilder, IViewBuilder viewBuilder, IResourceHandler resourceHandler, IMessageBoxProvider messageBoxProvider, IEmailDeliveryService emailDeliveryService) { this.unitOfWork = unitOfWork; this.viewModelBuilder = viewModelBuilder; this.viewBuilder = viewBuilder; this.resourceHandler = resourceHandler; this.messageBoxProvider = messageBoxProvider; this.emailDeliveryService = emailDeliveryService; }
public static Props Props( IMessageRoutingService messageRoutingService, IEmailDeliveryService emailDeliveryService, IAccountRepository accountRepository, Mapper mapper, int maxBatchSize, IDictionary <string, bool> validationRulesSettings, IDictionary <string, bool> handlersSettings) { return(Akka.Actor.Props.Create(() => new MessageRoutingManagerActor( messageRoutingService, emailDeliveryService, accountRepository, mapper, maxBatchSize, validationRulesSettings, handlersSettings) )); }
/// <summary> /// Initializes a new instance of the <see cref="NotificationGroupDialogViewModel"/> class. /// </summary> /// <param name="unitOfWork">Unit of work.</param> /// <param name="viewModelBuilder">View model builder.</param> /// <param name="viewBuilder">View builder.</param> /// <param name="resourceHandler">Resource handler.</param> /// <param name="messageBoxProvider">Message box provider.</param> /// <param name="emailDeliveryService">Email delivery service.</param> /// <param name="mode">Mode (Add/Edit).</param> /// <param name="model">Notification group model.</param> public NotificationGroupDialogViewModel( IUnitOfWork unitOfWork, IViewModelBuilder viewModelBuilder, IViewBuilder viewBuilder, IResourceHandler resourceHandler, IMessageBoxProvider messageBoxProvider, IEmailDeliveryService emailDeliveryService, WorkModeType mode, NotificationGroupModel model) : base(mode) { this.unitOfWork = unitOfWork; this.viewModelBuilder = viewModelBuilder; this.viewBuilder = viewBuilder; this.resourceHandler = resourceHandler; this.messageBoxProvider = messageBoxProvider; this.emailDeliveryService = emailDeliveryService; Task.Factory.StartNewWithDefaultCulture(() => this.Load(model)); }
public MessageRoutingManagerActor( IMessageRoutingService messageRoutingService, IEmailDeliveryService emailDeliveryService, IAccountRepository accountRepository, Mapper mapper, int maxBatchSize, IDictionary <string, bool> validationRulesSettings, IDictionary <string, bool> handlersSettings) : base("MessageRoutingManagerActor") { _messageRoutingService = messageRoutingService; _emailDeliveryService = emailDeliveryService; // Automapper is used to convert data that needs to be transmitted // between logical application layers. _mapper = mapper; // create child actors _messageResolverActor = Context.ActorOf( MessageResolverActor.Props(messageRoutingService, mapper), typeof(MessageResolverActor).Name ); _messageValidationActor = Context.ActorOf( MessageValidationActor.Props(messageRoutingService, accountRepository, mapper, validationRulesSettings), typeof(MessageValidationActor).Name ); _messageSendingActor = Context.ActorOf( MessageSendingActor.Props(emailDeliveryService, mapper, maxBatchSize), typeof(MessageSendingActor).Name ); _messageHandlerExecutorActor = Context.ActorOf( MessageHandlerExecutorActor.Props(handlersSettings, mapper), typeof(MessageHandlerExecutorActor).Name ); Command <EmailRequestMsg>(HandleEmailRequestMsg); Command <EmailResolvedMsg>(HandleEmailResolvedMsg); Command <EmailQualifyMsg>(HandleEmailQualifyMsg); Command <EmailDisqualifiedMsg>(HandleEmailDisqualifiedMsg); }
public static Props Props(IEmailDeliveryService emailDeliveryService, Mapper mapper, int maxBatchSize) { return(Akka.Actor.Props.Create(() => new MessageSendingActor(emailDeliveryService, mapper, maxBatchSize))); }