Example #1
0
 public CrashTask(CKTaskBuilder builder, IConfiguration config, CrashService crashService, IMailerService mailer)
     : base(builder)
 {
     _crashService = crashService;
     _config       = config;
     _mailer       = mailer;
 }
Example #2
0
 public EventChecker(IEventRepository eventRepository, IViagogoConnector viagogoConnector, ISubscriptionRepository subscriptionRepository, IMailerService mailerService)
 {
     _eventRepository        = eventRepository;
     _viagogoConnector       = viagogoConnector;
     _subscriptionRepository = subscriptionRepository;
     _mailerService          = mailerService;
 }
Example #3
0
 public NotifyPurchasersWhenNewOrderCreatedDomainEventHandler(
     IPurchaserRepository purchaserRepository,
     IMailerService mailerService)
 {
     this.purchaserRepository = purchaserRepository;
     this.mailerService       = mailerService;
 }
 /// <summary>
 /// SendMessage constructor
 /// </summary>
 /// <param name="logger"></param>
 public SendMessageController(ILogger <SendMessageController> logger, IMailerService mailer)
 {
     _logger = logger ??
               throw new ArgumentNullException(nameof(logger));
     _mailer = mailer ??
               throw new ArgumentNullException(nameof(mailer));
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="AccountController" />
 /// class.
 /// </summary>
 /// <param name="userManager">The user manager.</param>
 /// <param name="messageBuilder">The message builder.</param>
 /// <param name="mailer">The mailer.</param>
 /// <param name="options">The options.</param>
 /// <param name="logger">The logger.</param>
 /// <exception cref="ArgumentNullException">null options or userManager or
 /// signInManager or environment or messageBuilder or mailer</exception>
 public AccountController(UserManager <ApplicationUser> userManager,
                          IMessageBuilderService messageBuilder,
                          IMailerService mailer,
                          IOptions <MessagingOptions> options,
                          ILogger <AccountController> logger)
 {
     if (options == null)
     {
         throw new ArgumentNullException(nameof(options));
     }
     _userManager = userManager ??
                    throw new ArgumentNullException(nameof(userManager));
     //_signInManager = signInManager ??
     //    throw new ArgumentNullException(nameof(signInManager));
     //_environment = environment ??
     //    throw new ArgumentNullException(nameof(environment));
     _messageBuilder = messageBuilder ??
                       throw new ArgumentNullException(nameof(messageBuilder));
     _mailer  = mailer ?? throw new ArgumentNullException(nameof(mailer));
     _options = options.Value;
     //_configuration = configuration ??
     //    throw new ArgumentNullException(nameof(configuration));
     _logger = logger ??
               throw new ArgumentNullException(nameof(logger));
 }
Example #6
0
        public void Startup()
        {
            _orderRepository = new TestOrderRepository();
            _catalogRepository = new TestCatalogRepository();
            _addressValidation = new TestAddressValidator();
            _shippingRepository = new TestShippingRepository();
            _shippingService = new SimpleShippingService(_shippingRepository);
            _taxRepository = new TestTaxRepository();
            _taxService = new RegionalSalesTaxService(_taxRepository);
            _orderService = new OrderService(_orderRepository,_catalogRepository,_shippingRepository,_shippingService);
            _personalizationRepository = new TestPersonalizationRepository();
            _personalizationService = new PersonalizationService(_personalizationRepository,_orderRepository, _orderService,_catalogRepository);
            _catalogService = new CatalogService(_catalogRepository,_orderService);
            _paymentService = new FakePaymentService();
            _incentiveRepository = new TestIncentiveRepository();
            _incentiveService = new IncentiveService(_incentiveRepository);

            //this service throws the sent mailers into a collection
            //and does not use SMTP
            _mailerService = new TestMailerService();
            _inventoryRepository = new TestInventoryRepository();
            _inventoryService = new InventoryService(_inventoryRepository,_catalogService);
            _mailerRepository = new TestMailerRepository();
            _pipeline=new DefaultPipeline(
                _addressValidation,_paymentService,
                _orderService,_mailerService,
                _inventoryService
                );


        }
Example #7
0
 public AuthorizationBus(IUserDao iUserDao, IMailerService iMailerService, IRefreshTokenDao iRefreshTokenDao, IClientDao iClientDao)
 {
     _iUserDao         = iUserDao;
     _iMailerService   = iMailerService;
     _iRefreshTokenDao = iRefreshTokenDao;
     _iClientDao       = iClientDao;
 }
Example #8
0
        public void Startup()
        {
            _orderRepository           = new TestOrderRepository();
            _catalogRepository         = new TestCatalogRepository();
            _addressValidation         = new TestAddressValidator();
            _shippingRepository        = new TestShippingRepository();
            _shippingService           = new SimpleShippingService(_shippingRepository);
            _taxRepository             = new TestTaxRepository();
            _taxService                = new RegionalSalesTaxService(_taxRepository);
            _orderService              = new OrderService(_orderRepository, _catalogRepository, _shippingRepository, _shippingService);
            _personalizationRepository = new TestPersonalizationRepository();
            _personalizationService    = new PersonalizationService(_personalizationRepository, _orderRepository, _orderService, _catalogRepository);
            _catalogService            = new CatalogService(_catalogRepository, _orderService);
            _paymentService            = new FakePaymentService();
            _incentiveRepository       = new TestIncentiveRepository();
            _incentiveService          = new IncentiveService(_incentiveRepository);

            //this service throws the sent mailers into a collection
            //and does not use SMTP
            _mailerService       = new TestMailerService();
            _inventoryRepository = new TestInventoryRepository();
            _inventoryService    = new InventoryService(_inventoryRepository, _catalogService);
            _mailerRepository    = new TestMailerRepository();
            _pipeline            = new DefaultPipeline(
                _addressValidation, _paymentService,
                _orderService, _mailerService,
                _inventoryService
                );
        }
 public AppointmentBus(IAppointmentDao iAppointmentDao, IUserDao iUserDao, IMailerService iMailerService,
                       IHorseAdDao iHorseAdDao)
 {
     _iAppointmentDao = iAppointmentDao;
     _iUserDao        = iUserDao;
     _iMailerService  = iMailerService;
     _iHorseAdDao     = iHorseAdDao;
 }
Example #10
0
 public HorseAdBus(IHorseAdDao iHorseAdDao, IUserDao iAuthDao, IAppointmentDao iAppointmentDao, IMailerService iMailerService, IImageDao iImageDao)
 {
     _iHorseAdDao     = iHorseAdDao;
     _iUserDao        = iAuthDao;
     _iMailerService  = iMailerService;
     _iAppointmentDao = iAppointmentDao;
     _iImageDao       = iImageDao;
 }
Example #11
0
 public DefaultRequestForQuotationFacade(IMailerService mailerService,
                                         IRfqPdfGenerator rfqPdfGenerator,
                                         IOptions <SmtpConfiguration> smtpConfiguration)
 {
     _mailerService     = mailerService;
     _rfqPdfGenerator   = rfqPdfGenerator;
     _smtpConfiguration = smtpConfiguration.Value;
 }
 public PayPalController(IOrderService orderService, 
     ILogger logger, IPipelineEngine pipeline, IMailerService mail, IShippingService shippingService) {
     _orderService = orderService;
     _logger = logger;
     _pipeline = pipeline;
     _mail = mail;
     _shippingService = shippingService;
 }
 public PayPalController(IOrderService orderService,
                         ILogger logger, IPipelineEngine pipeline, IMailerService mail, IShippingService shippingService)
 {
     _orderService    = orderService;
     _logger          = logger;
     _pipeline        = pipeline;
     _mail            = mail;
     _shippingService = shippingService;
 }
Example #14
0
        public ForgottenPasswordHandler(IMailerService mailerService, IDateService dateService)
        {
            Preconditions.CheckNotNull(mailerService, "mailerService");
            Preconditions.CheckNotNull(dateService, "dateService");

            this.mailerService = mailerService;
            this.dateService   = dateService;
            secretKey          = System.Configuration.ConfigurationManager.AppSettings ["SecretKey"];
        }
        public EventCheckerBuilder()
        {
            ViagogoWatcherContext viagogoWatcherContext = new ViagogoWatcherContext();

            _eventRepository        = new EFEventRepository(viagogoWatcherContext);
            _viagogoConnector       = new ViagogoConnector();
            _subscriptionRepository = new EFSubscriptionRepository(viagogoWatcherContext);
            _mailerService          = new MailerServiceBuilder().Build();
        }
Example #16
0
        public ShareController(IMailerService emailService)
        {
            if (emailService == null)
            {
                throw new ArgumentNullException("emailService");
            }

            _emailService = emailService;
        }
Example #17
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TestController" /> class.
 /// </summary>
 /// <param name="logger">The logger.</param>
 /// <param name="messageBuilderService">The message builder service.</param>
 /// <param name="mailerService">The mailer service.</param>
 /// <exception cref="ArgumentNullException">logger</exception>
 public TestController(ILogger <TestController> logger,
                       IMessageBuilderService messageBuilderService,
                       IMailerService mailerService)
 {
     _logger = logger ?? throw new ArgumentNullException(nameof(logger));
     _messageBuilderService = messageBuilderService ??
                              throw new ArgumentNullException(nameof(messageBuilderService));
     _mailerService = mailerService ??
                      throw new ArgumentNullException(nameof(mailerService));
 }
        public RegisterUserHandler(IDataWriter dataWriter, IPasswordService passwordService, IMailerService mailerService)
        {
            Preconditions.CheckNotNull(dataWriter, "dataWriter");
            Preconditions.CheckNotNull(passwordService, "passwordService");
            Preconditions.CheckNotNull(mailerService, "mailerService");

            this.dataWriter      = dataWriter;
            this.passwordService = passwordService;
            this.mailerService   = mailerService;
        }
Example #19
0
        public AuditService(EasyAdminContext context, IMailerService mailer, IAuthenticationService authService)
        {
            _context     = context;
            _mailer      = mailer;
            _authService = authService;
            _date        = DateTime.Today;
            TimeSpan ts = new TimeSpan(13, 0, 0);

            _date = _date.Date + ts;
        }
 public ButtonViewModel(IFootballRepository footballRepository, IPlayerMatchViewModel playerMatchViewModel, IMatchValidatorService matchValidatorService, IMailerService mailerService)
 {
     _footballRepository = footballRepository;
     _playerMatchViewModel = playerMatchViewModel;
     _matchValidatorService = matchValidatorService;
     _matchValidatorService.PlayerMatches = _playerMatchViewModel.PlayerMatches;
     _selectedMatch = new Match();
     _mailerService = mailerService;
     _canExecute = true;
 }
Example #21
0
 public EmailController(ITransactionService transactionService, ICheckoutService checkoutService, IPersonService personService,
                        IMappingEngine mappingEngine, IMailerService mailerService, IBasketViewModelBuilder basketViewModelBuilder)
 {
     _transactionService     = transactionService;
     _checkoutService        = checkoutService;
     _mappingEngine          = mappingEngine;
     _mailer                 = mailerService;
     _basketViewModelBuilder = basketViewModelBuilder;
     _personService          = personService;
 }
        public void Setup()
        {
            ConfMailing confMailing = new ConfMailing("*****@*****.**", new Credential("login", "password"));

            _mock = new Mock <ISmtpClientFacade>();

            _mailerService = new MailerServiceBuilder()
                             .WithConfMailing(confMailing)
                             .WithStmpClientFacade(_mock.Object)
                             .Build();
        }
Example #23
0
 public VmController(EasyAdminContext context, IMailerService mailer, IAuthenticationService authService, IServiceScopeFactory serviceScopeFactory,
                     IBackgroundTaskQueue taskQueue, ILogger <VmController> logger, IMemoryCache cache)
 {
     Thread.CurrentThread.CurrentCulture = new CultureInfo("ru-RU");
     _context             = context;
     _mailer              = mailer;
     _authService         = authService;
     _taskQueue           = taskQueue;
     _serviceScopeFactory = serviceScopeFactory;
     _logger              = logger;
     _cache = cache;
 }
 // private readonly IMailListCache _mailList;
 public DMCLService(OnlineSalesContext context,
                    IHttpContextAccessor httpContext,
                    IScheduleMatcher matcher,
                    IAPIAuth apiAuth,
                    IMailerService mail,
                    ILogger <DMCLService> logger) : base(httpContext, context)
 {
     _matcher = matcher;
     _apiAuth = apiAuth;
     _logger  = logger;
     _mail    = mail;
 }
Example #25
0
 public AuthService(
     UserManager <ApplicationUser> userManager,
     ClaimsPrincipal userClaim,
     IConfiguration configuration,
     DatabaseContext husenseDatabaseContext,
     IMailerService mailer)
 {
     _userManager   = userManager;
     _userClaim     = userClaim;
     _configuration = configuration;
     _context       = husenseDatabaseContext;
     _mailer        = mailer;
 }
Example #26
0
        public ClockTimer(IMailerService mailerService, IEventChecker eventChecker)
        {
            _mailerService = mailerService;
            int interval = int.Parse(ConfigurationManager.AppSettings["TimingRefreshInMs"]);

            _timer = new Timer(interval)
            {
                AutoReset = true,
                Enabled   = true,
            };
            _timer.Elapsed += (sender, args) => Watch();
            _eventChecker   = eventChecker;
        }
Example #27
0
 public DefaultPipeline(
     IAddressValidationService addressValidation,
     IPaymentService paymentService,
     IOrderService orderService,
     IMailerService mailerService,
     IInventoryService inventoryService
     )
 {
     _addressValidation = addressValidation;
     _paymentService    = paymentService;
     _orderService      = orderService;
     _mailerService     = mailerService;
     _inventoryService  = inventoryService;
 }
 public ResetPasswordService(
     IMailerService mailerService,
     IPasswordResetRequestRepository passwordResetRequestRepository,
     IUserService userService,
     IConfigurationRepository configurationRepository,
     IOptionsMonitor <ResetPasswordOptions> _resetPassOptionsMonitor
     )
 {
     _mailerService = mailerService ?? throw new ArgumentNullException(nameof(mailerService));
     _userService   = userService ?? throw new ArgumentNullException(nameof(userService));
     _passwordResetRequestRepository = passwordResetRequestRepository ?? throw new ArgumentNullException(nameof(passwordResetRequestRepository));
     _configurationRepository        = configurationRepository ?? throw new ArgumentNullException(nameof(configurationRepository));
     _serviceEmail = _resetPassOptionsMonitor.CurrentValue?.ServiceEmailAddress ?? throw new ArgumentNullException(nameof(_resetPassOptionsMonitor.CurrentValue));
 }
Example #29
0
 public BetService(IOptions <BetOptions> options,
                   BettyContext context,
                   IHttpContextAccessor httpContext,
                   IMailerService mail,
                   ILogger <BetService> logger,
                   IHubContext <FixturesFeed> hubContext)
 {
     _options     = options.Value;
     _context     = context;
     _httpContext = httpContext.HttpContext;
     _mail        = mail;
     _logger      = logger;
     _hubContext  = hubContext;
 }
        public WindowsWorkflowPipeline(
            IAddressValidationService addressValidation,
            IPaymentService paymentService,
            IOrderService orderService,
            IMailerService mailerService,
            IInventoryService inventoryService
            ) {
            _addressValidation = addressValidation;
            _paymentService = paymentService;
            _orderService = orderService;
            _mailerService = mailerService;
            _inventoryService = inventoryService;

        }
 public MatchViewModel()
 {
     _footballRepository = new FootballRepository(new FootballEntities());
     _playerMatchViewModel = new PlayerMatchViewModel(_footballRepository);
     _dialogService = new DialogService();
     _playerValidatorService = new PlayerValidatorService(_dialogService);
     _matchValidatorService = new MatchValidatorService(_playerMatchViewModel, _dialogService);
     _mailerService = new MailerService(_playerMatchViewModel, _playerMatchViewModel.PlayerMatches, _teams);
     ButtonViewModel = new ButtonViewModel(_footballRepository, _playerMatchViewModel, _matchValidatorService, _mailerService);
     PlayerViewModel = new PlayerViewModel(_footballRepository, _playerMatchViewModel, _playerValidatorService);
     MatchButtonViewModel = new MatchButtonViewModel(_footballRepository, this, new DialogSelectionService());
     InitialiseMatchesAndTeams();
     _selectionAlgorithms = InitialiseSelectionAlgorithms();
     _selectedAlgorithm = _selectionAlgorithms.First();
     ButtonViewModel.SelectedAlgorithm = _selectedAlgorithm;
 }
Example #32
0
        public EnquiriesController(IPersonService personService, IMailerService mailerService,
                                   IMappingEngine mappingEngine, IAddressService addressService,
                                   IEnquiryTypeService enquiryTypeService, IEnquiryService enquiryService,
                                   ISerializer serializer, IEnquiryRecipientService enquiryRecipientService)
        {
            if (mailerService == null)
            {
                throw new ArgumentNullException("mailerService");
            }
            if (personService == null)
            {
                throw new ArgumentNullException("personService");
            }
            if (mappingEngine == null)
            {
                throw new ArgumentNullException("mappingEngine");
            }
            if (addressService == null)
            {
                throw new ArgumentNullException("addressService");
            }
            if (enquiryTypeService == null)
            {
                throw new ArgumentNullException("enquiryTypeService");
            }
            if (enquiryService == null)
            {
                throw new ArgumentNullException("enquiryService");
            }
            if (serializer == null)
            {
                throw new ArgumentNullException("serializer");
            }
            if (enquiryRecipientService == null)
            {
                throw new ArgumentNullException("enquiryRecipientService");
            }

            _mailerService           = mailerService;
            _mappingEngine           = mappingEngine;
            _personService           = personService;
            _addressService          = addressService;
            _enquiryService          = enquiryService;
            _enquiryTypeService      = enquiryTypeService;
            _serializer              = serializer;
            _enquiryRecipientService = enquiryRecipientService;
        }
Example #33
0
 public CaseService(OnlineSalesContext context,
                    IHttpContextAccessor httpContext,
                    IRoleCache roleCache,
                    ILogger <CaseService> logger,
                    ListQuery <OnlineOrder, CaseDTO> q,
                    IIndusService indus,
                    IOptions <CaseOptions> options,
                    IMailerService mail)
     : base(httpContext, context)
 {
     _logger    = logger;
     _query     = q;
     _roleCache = roleCache;
     _indus     = indus;
     _mail      = mail;
     _options   = options.Value;
 }
Example #34
0
        public EmailSenderTests()
        {
            _loggerMock               = Mock.Of <ILogger <MailerService> >();
            _loggerDbMock             = new Mock <ILogRepository>();
            _messageRepositoryMock    = new Mock <IMessageTemplateRepository>();
            _mailerOptionsMonitorMock = new Mock <IOptionsMonitor <MailerOptions> >();

            string MailTo = Fixture.Create <string>();
            var    To     = Fixture.Build <string>()
                            .CreateMany(10).ToList();
            string From = Fixture.Create <string>();

            _mailerOptionsMonitorMock.Setup(x => x.CurrentValue).Returns(new MailerOptions()
            {
                From   = From,
                MailTo = MailTo,
                To     = To
            });

            _mailerService = new MailerService(_mailerOptionsMonitorMock.Object, _messageRepositoryMock.Object, _loggerMock, _loggerDbMock.Object);
        }
Example #35
0
 public IndexModel(ShopDbContext context, IMailerService mailer, IOptions <ShopConfig> config)
 {
     this._context = context;
     this._mailer  = mailer;
     this._config  = config.Value;
 }
Example #36
0
 public PozoController(IPozoRepository repository, IPozoValidator validator, IMailerService mailer)
 {
     this.repository = repository;
     this.validator = validator;
     this.mailer = mailer;
 }