Esempio n. 1
0
        public async Task Execute(IJobExecutionContext context)
        {
            IUnityContainer    container   = new UnityContainer();
            IPetRepository     PetRepo     = container.Resolve <PetRepository>();
            IUserRepository    UserRepo    = container.Resolve <UserRepository>();
            IServiceRepository ServiceRepo = container.Resolve <ServiceRepository>();
            IEmailRepository   EmailRepo   = container.Resolve <EmailRepository>();
            var            List            = ServiceRepo.GetAllListOfElements();
            List <Service> res             = new List <Service>();

            foreach (var i in List)
            {
                DateTime dateser = DateTime.Parse(i.DateTimeService);
                TimeSpan span    = dateser.Subtract(DateTime.Now);

                if (dateser.Day > DateTime.Now.Day && (int)span.TotalHours < 35)
                {
                    string to = UserRepo.GetElementsById(PetRepo.GetElementsById(i.IDPet.ToString()).OwnerId.ToString()).Email;

                    string body = "Здравствуйте уважаемый клиент! Напоминаем, что вы записаны на прием "
                                  + dateser.ToString("dd.MM.yyyy")
                                  + " в " + dateser.ToString("HH:mm") + ". ";
                    {
                        await EmailRepo.SendEmail("СЮДА СВОЙ ЕМАЙИЛ", "СЮДА ПАРОЛЬЕМАЙЛА", to, "Напоминание о приеме на завтра", body);
                    }
                }
            }
        }
Esempio n. 2
0
 public EmailProvider(IServiceProvider services, IContextLock access, SmallWorldOptions options, IEmailRepository emails)
 {
     this.services = services;
     this.options  = options;
     this.emails   = emails;
     this.access   = access;
 }
Esempio n. 3
0
        public EMailHandler(IConfiguration _configuration)
        {
            var factory = new ProcessorFactoryResolver <IEmailRepository>(_configuration);

            emailRepository = factory.CreateProcessor();
            configuration   = _configuration;
        }
Esempio n. 4
0
 public PersonController(IPhoneRepository phone, IPersonRepository person, IEmailRepository email, ILogRepository log)
 {
     _phone  = phone;
     _email  = email;
     _person = person;
     _log    = log;
 }
Esempio n. 5
0
 public DashBoardService(IUserRepository IUserRepository, IEmailRepository IEmailRepository, IOrderRepository IOrderRepository, IRemarksRepository IRemarksRepository)
 {
     _iUserRepository    = IUserRepository;
     _iEmailRepository   = IEmailRepository;
     _iOrderRepository   = IOrderRepository;
     _iRemarksRepository = IRemarksRepository;
 }
Esempio n. 6
0
 public EmailSendingJob(IOptions <MailSetting> mailsettings,
                        IEmailRepository emailRepository, IEmailService emailService)
 {
     _emailService    = emailService;
     _emailRepository = emailRepository;
     _mailsettings    = mailsettings.Value;
 }
 public VerlanglijstController(IGebruikerRepository gebruikerRepository, IProductRepository productRepository, IEmailRepository emailRepository)
 {
     this.productRepository   = productRepository;
     this.gebruikerRepository = gebruikerRepository;
     this.emailRepository     = emailRepository;
     viewModelFactory         = new ViewModelFactory();
 }
Esempio n. 8
0
 public EmailProcessor(
     IEmailRepository emailRepository, IEnumerable <IEmailSender> emailSenders, ILogger <EmailProcessor> logger)
 {
     this.emailRepository = emailRepository;
     this.emailSenders    = emailSenders;
     this.logger          = logger;
 }
Esempio n. 9
0
 public UserController(IUserRepository user, IPermissionRepository permission, IRoleRepository role, IEmailRepository email)
 {
     _user       = user;
     _permission = permission;
     _role       = role;
     _email      = email;
 }
        private string BuildEmailDetailsPage(IEmailRepository emailRepository, string emailId)
        {
            EmailMessage email = null;

            foreach (var item in emailRepository.ReceivedMessages)
            {
                if (item.Guid.ToString() == emailId)
                {
                    email = item;
                    break;
                }
            }
            if (email == null)
            {
                return("Invalid email id");
            }

            StringBuilder pageBody = new StringBuilder();

            pageBody.Append(ReadResourceFromAssembly("SmtpMoq.Resources.EmailDetails.html"));
            pageBody.Replace("***fromemail***", email.From);
            pageBody.Replace("***toemail***", email.RecipientsCommaSeparated);
            pageBody.Replace("***emaildata***", email.Data);

            return(pageBody.ToString());
        }
Esempio n. 11
0
 public PessoaRepository(RouteContext context) : base(context)
 {
     enderecoRepository = new EnderecoRepository(Context);
     telefoneRepository = new TelefoneRepository(Context);
     emailRepository    = new EmailRepository(Context);
     agendaRepository   = new AgendaRepository(Context);
 }
 public OrderRepository(IProductRepository productRepository, IPaymentSeriveRepository paymentSeriveRepository, IEmailRepository emailRepository)
 {
     errors                   = new List <string>();
     _productRepository       = productRepository;
     _paymentSeriveRepository = paymentSeriveRepository;
     _emailRepository         = emailRepository;
 }
Esempio n. 13
0
 public EmailManager(IEmailRepository emailRepository, IOptions <TeamBinsAppSettings> settings,
                     ITeamRepository teamRepository)
 {
     this._teamRepository  = teamRepository;
     this._emailRepository = emailRepository;
     this._settings        = settings.Value;
 }
Esempio n. 14
0
        public BulkEmailViewModel(INavigationManager navigation, IUnitOfWorkFactory unitOfWorkFactory,
                                  Func <IUnitOfWork, IQueryOver <Order> > itemsSourceQueryFunction, IEmailParametersProvider emailParametersProvider,
                                  ICommonServices commonServices, IAttachmentsViewModelFactory attachmentsViewModelFactory, Employee author, IEmailRepository emailRepository) : base(navigation)
        {
            _uow = (unitOfWorkFactory ?? throw new ArgumentNullException(nameof(unitOfWorkFactory))).CreateWithoutRoot();
            _emailParametersProvider = emailParametersProvider ?? throw new ArgumentNullException(nameof(emailParametersProvider));
            _commonServices          = commonServices ?? throw new ArgumentNullException(nameof(commonServices));
            _author          = author ?? throw new ArgumentNullException(nameof(author));
            _emailRepository = emailRepository ?? throw new ArgumentNullException(nameof(emailRepository));
            _instanceId      = emailRepository.GetCurrentDatabaseId(_uow);

            _configuration = _uow.GetAll <InstanceMailingConfiguration>().FirstOrDefault();

            AttachmentsEmailViewModel = attachmentsViewModelFactory.CreateNewAttachmentsViewModel(ObservableAttachments);

            ObservableAttachments.ListContentChanged += ObservableAttachments_ListContentChanged;

            var itemsSourceQuery = itemsSourceQueryFunction.Invoke(_uow);

            _debtorJournalNodes = itemsSourceQuery.List <DebtorJournalNode>();

            MailSubject = string.Empty;

            Init();
        }
Esempio n. 15
0
 public EmailOutbox(IEmailDispatcher dispatcher, IMailMessageCreator messageCreator, IEmailRepository repository, ILogger <EmailOutbox> log)
 {
     Dispatcher     = dispatcher;
     MessageCreator = messageCreator;
     Repository     = repository;
     Log            = log;
 }
 public LoginServiceImpl(ILoginRepository loginRepository, IEmailRepository emailRepository, IMail mail)
 {
     repository = loginRepository;
     this.emailRepository = emailRepository;
     this.mail = mail;
     this.constituentRepository = constituentRepository;
 }
        //   C o n s t r u c t o r s

        public HomeController(ILogger <HomeController> logger, IEmailRepository emailRepo, IPetRepository petRepository, IUserRepository userRepository)
        {
            _logger         = logger;
            _emailRepo      = emailRepo;
            _petRepository  = petRepository;
            _userRepository = userRepository;
        }
 public void SetUp()
 {
     unitOfWork      = Substitute.For <IUnitOfWork>();
     emailRepository = Substitute.For <IEmailRepository>();
     unitOfWork.EmailRepository.ReturnsForAnyArgs(emailRepository);
     getEmailUseCase = new GetEmailUseCase(unitOfWork);
 }
Esempio n. 19
0
 public ContactListService(IContactRepository contactRepository, IEmailRepository emailRepository, IPhoneRepository phoneRepository, ITagRepository tagRepository)
 {
     this.contactRepository = contactRepository;
     this.emailRepository   = emailRepository;
     this.phoneRepository   = phoneRepository;
     this.tagRepository     = tagRepository;
 }
Esempio n. 20
0
 public EmailManager(
     IPersonRepository personRepo,
     IPersonEmailRepository personEmailRepository,
     IEmailAccountRepository emailAccountRepository,
     IEmailRepository emailRepository,
     IEmailSettingsRepository emailSettingsRepository,
     IOrganizationManager organizationManager,
     IHttpContextAccessor httpContextAccessor,
     IEmailAttachmentRepository emailAttachmentRepository,
     IFileManager fileManager,
     IStorageDriveRepository storageDriveRepository,
     IStorageFileRepository storageFileRepository)
 {
     _personRepo                = personRepo;
     _personEmailRepository     = personEmailRepository;
     _emailAccountRepository    = emailAccountRepository;
     _emailRepository           = emailRepository;
     _emailSettingsRepository   = emailSettingsRepository;
     _organizationManager       = organizationManager;
     _httpContextAccessor       = httpContextAccessor;
     _emailAttachmentRepository = emailAttachmentRepository;
     _fileManager               = fileManager;
     _storageDriveRepository    = storageDriveRepository;
     _storageFileRepository     = storageFileRepository;
 }
Esempio n. 21
0
 public EmailManager(IEmailRepository emailRepository, IOptions<AppSettings> settings,
     ITeamRepository teamRepository)
 {
     this._teamRepository = teamRepository;
     this._emailRepository = emailRepository;
     this._settings = settings.Value;
 }
Esempio n. 22
0
 public EmailService(IEmailRepository emailRepository, ICustomerRepository customerRepository,
                     IUnitOfWork uow, IEmployeeRepository employeeRepository)
     : this(emailRepository, uow)
 {
     this._customerRepository = customerRepository;
     _employeeRepository      = employeeRepository;
 }
Esempio n. 23
0
 public EmailService(IEmailBodyFormatter emailBodyFormatter, IWebDataScrapingService webDataScrappingService, IEmailRepository emailRepository, IEmailSender emailSender)
 {
     _emailBodyFormatter     = emailBodyFormatter;
     _webDataScrapingService = webDataScrappingService;
     _emailRepository        = emailRepository;
     _emailSender            = emailSender;
 }
Esempio n. 24
0
        public EmailService(IEmailTemplateService templateService, IEmailRepository emailRepository)
        {
            Ensure.That(() => templateService).IsNotNull();
            Ensure.That(() => emailRepository).IsNotNull();

            this.templateService = templateService;
            this.emailRepository = emailRepository;
        }
Esempio n. 25
0
        public EmailRecorder(ISmtpServer smtpServer, IEmailRepository emailRepository, IGroupRepository groupRepository)
        {
            _smtpServer = smtpServer;
            _emailRepository = emailRepository;
            _groupRepository = groupRepository;

            RecordMail();
        }
Esempio n. 26
0
        public EmailService(IEmailRepository emailRepository, IReferenceGenerator referenceGenerator)
        {
            Check.If(emailRepository).IsNotNull();
            Check.If(referenceGenerator).IsNotNull();

            _emailRepository = emailRepository;
            _referenceGenerator = referenceGenerator;
        }
Esempio n. 27
0
 public SendEmailController(IInspectionRepository inspectionRepository,
                            IMistakeRepository mistakeRepository,
                            IEmailRepository emailRepository)
 {
     _inspectionRepository = inspectionRepository;
     _mistakeRepository    = mistakeRepository;
     _emailRepository      = emailRepository;
 }
Esempio n. 28
0
        private static void Setup()
        {
            IKernel kernel = new StandardKernel(new BindingModule());

            _messageQueue    = kernel.Get <IMessageQueue>();
            _emailRepository = kernel.Get <IEmailRepository>();
            _bucket          = kernel.Get <IFileStorageProvider>();
        }
Esempio n. 29
0
 public EmailController(IOptions <GmailSettings> gmailConfig, IDatingRepository repo, IEmailRepository repoEmail)
 {
     _gmailConfig = gmailConfig;
     _userName    = _gmailConfig.Value.UserName;
     _password    = _gmailConfig.Value.ApiSecret;
     _repo        = repo;
     _repoEmail   = repoEmail;
 }
Esempio n. 30
0
 public EmailController(ILogger <EmailController> logger, IConfiguration configuration, EmailContext context)
 {
     _logger                 = logger;
     _configuration          = configuration;
     _templatesRepository    = new EmailTemplatesRepository(context);
     _emailRepository        = new MailKitRepository(configuration);
     _emailHistoryRepository = new EmailHistoryRepository(context);
 }
Esempio n. 31
0
        public EmailRepositoryTest()
        {
            _mockService       = new Mock <IMongoService>();
            _mockMapper        = new Mock <IMapper>();
            _mockConfiguration = new Mock <IConfiguration>();

            _emailRepository = new EmailRepository(_mockService.Object, _mockConfiguration.Object, _mockMapper.Object);
        }
Esempio n. 32
0
 public EmailService(IEmailRepository emailRepository)
 {
     _emailRepository = emailRepository;
     if (!string.IsNullOrEmpty(CurrentUser.DbName))
     {
         this._dbName = CurrentUser.DbName;
     }
 }
Esempio n. 33
0
 public EmailService(IChapterRepository chapterRepository, IEmailRepository emailRepository,
                     IMailProvider mailProvider, IMemberRepository memberRepository)
 {
     _chapterRepository = chapterRepository;
     _emailRepository   = emailRepository;
     _mailProvider      = mailProvider;
     _memberRepository  = memberRepository;
 }
Esempio n. 34
0
 public SmtpServer(SmtpServerSettings settings, IEmailRepository emailRepository, ILogger logger)
 {
     this.Settings             = settings;
     this.emailRepository      = emailRepository;
     this.logger               = logger;
     this.smtpListener         = null;
     this.connectionsToDispose = new SynchronizedCollection <TcpClient>();
 }
Esempio n. 35
0
 public OrdersController()
 {
     _productDal              = new ProductDAL();
     _productRepository       = new ProductRepository(_productDal);
     _paymentSeriveRepository = new PaymentSeriveRepository();
     _emailRepository         = new EmailRepository();
     _orderRepository         = new OrderRepository(_productRepository, _paymentSeriveRepository, _emailRepository);
 }
 public UserAccountManager(IUserRepository userRepository, IUserAuthHelper userSessionHelper, IProjectManager projectManager, ITeamRepository teamRepository, IEmailManager emailManager, IEmailRepository emailRepository, IOptions<AppSettings> settings)
 {
     this.emailManager = emailManager;
     this.userRepository = userRepository;
     this.userSessionHelper = userSessionHelper;
     this.projectManager = projectManager;
     this.teamRepository = teamRepository;
     this.emailRepository = emailRepository;
     this._settings = settings.Value;
 }
Esempio n. 37
0
 public CommentManager(ICommentRepository commentRepository,IUserAuthHelper userSessionHelper,
     IIssueRepository issueRepository, IActivityRepository activityRepository,IEmailManager emailManager,ITeamRepository teamRepository,IEmailRepository emailRepository, IOptions<AppSettings> settings)
 {
     this._settings = settings.Value;
     this._emailRepository = emailRepository;
     this._teamRepository = teamRepository;
     this._emailManager = emailManager;
     this._commentRepository = commentRepository;
     this._userSessionHelper = userSessionHelper;
     this._issueRepository = issueRepository;
     this._activityRepository = activityRepository;
 }
        public ValidationService(IEmailRepository emailRepository, ITelephoneNumberRepository telephoneNumberRepository,
            IPipelinePositionGenerator pipelinePositionGenerator, IArchiveService archiveService)
        {
            Check.If(emailRepository).IsNotNull();
            Check.If(telephoneNumberRepository).IsNotNull();
            Check.If(pipelinePositionGenerator).IsNotNull();
            Check.If(archiveService).IsNotNull();

            _emailRepository = emailRepository;
            _telephoneNumberRepository = telephoneNumberRepository;
            _pipelinePositionGenerator = pipelinePositionGenerator;
            _archiveService = archiveService;
        }
Esempio n. 39
0
 public IncomingDocProcessor(
     Func<Owned<IUnitOfWork>> unitOfWorkFactory,
     IUnitOfWork unitOfWork,
     IDocRepository docRepository,
     IEmailRepository emailRepository,
     ICorrespondentRepository correspondentRepository,
     IRioObjectExtractor rioObjectExtractor,
     IRioDocumentParser rioDocumentParser,
     IRioValidator rioValidator)
 {
     this.unitOfWorkFactory = unitOfWorkFactory;
     this.unitOfWork = unitOfWork;
     this.docRepository = docRepository;
     this.emailRepository = emailRepository;
     this.correspondentRepository = correspondentRepository;
     this.rioObjectExtractor = rioObjectExtractor;
     this.rioDocumentParser = rioDocumentParser;
     this.rioValidator = rioValidator;
 }
        public EmailService(IMailboxConfiguration mailboxConfiguration, 
                            IForwardService forwardService,
                            IEmailProvider emailProvider, 
                            IEmailRepository emailRepository, 
                            IReferenceGenerator referenceGenerator, 
                            IEmailServiceSettings emailServiceSettings)
        {
            Check.If(mailboxConfiguration).IsNotNull();
            Check.If(forwardService).IsNotNull();
            Check.If(emailProvider).IsNotNull();
            Check.If(emailRepository).IsNotNull();
            Check.If(referenceGenerator).IsNotNull();
            Check.If(emailServiceSettings).IsNotNull();

            _mailboxConfiguration = mailboxConfiguration;
            _forwardService = forwardService;
            _emailProvider = emailProvider;
            _emailRepository = emailRepository;
            _referenceGenerator = referenceGenerator;
            _emailServiceSettings = emailServiceSettings;
        }
Esempio n. 41
0
 /// <summary>
 /// Inject the contructor with email for the user
 /// </summary>
 /// <param name="emailRepo"></param>
 public UserRepository(IEmailRepository emailRepo)
 {
     this.emailRepo = emailRepo;
 }
 /// <summary>
 /// Inject the contructor with insurance dependencies 
 /// </summary>
 public InsuranceRepository(IEmailRepository emailRepo, IUserRepository userRepo, IDeductibleRepository deductibleRepo)
 {
     this.userRepo = userRepo;
       this.emailRepo = emailRepo;
       this.deductibleRepo = deductibleRepo;
 }
Esempio n. 43
0
 public EmailBL()
 {
     this.emailRepository = new EmailRepository();
     this.companyID = Convert.ToInt32(HttpContext.Current.Session["CompanyID"]);
 }
Esempio n. 44
0
 public EmailManager(IEmailRepository emailRepository, IGroupRepository groupRepository)
 {
     _emailRepository = emailRepository;
     _groupRepository = groupRepository;
 }
Esempio n. 45
0
 public EmailService(ILoggingService loggingService, ISettingsService settingsService, IEmailRepository emailRepository)
 {
     _loggingService = loggingService;
     _settingsService = settingsService;
     _emailRepository = emailRepository;
 }
Esempio n. 46
0
 public EmailManager() 
 {
     unitOfWorkLive = new UnitOfWork();
     emailRepository = new EmailRepository(unitOfWorkLive);
     lookupMgr = new LookupManager(); 
 }
Esempio n. 47
0
 /// <summary>
 /// Property controller contructor to use contructor injection based on interface type
 /// </summary>
 public UserController(IUserRepository userRepo, IEmailRepository emailRepo)
 {
     this.userRepo = userRepo;
       this.emailRepo = emailRepo;
 }
Esempio n. 48
0
 public EmailService(IEmailRepository anEmailRepo)
 {
     theEmailRepository = anEmailRepo;
 }
Esempio n. 49
0
 public MailConnector(IEmailRepository repository)
 {
     Repository = repository;
 }
        public void Setup()
        {
            _mockDbSettings.Setup(x => x.ConnectionString).Returns("TestConnectionString");
            _mockContext.Setup(x => x.Emails).Returns(_mockDbSet.Object);
            _mockContext.Setup(x => x.SaveChanges()).Returns(1);

            _emailRepository = new EmailRepository(_mockContext.Object);
        }
Esempio n. 51
0
 /// <summary>
 /// Insurance controller contructor to use contructor injection based
 /// on interface type.
 /// </summary>
 /// <param name="insuranceRepo"></param>
 public InsuranceController(IInsuranceRepository insRepo, IUserRepository userRepo, IEmailRepository emailRepo)
 {
     this.insRepo = insRepo;
       this.userRepo = userRepo;
       this.emailRepo = emailRepo;
 }
Esempio n. 52
0
 public EmailService(IEmailTemplateEngine composer, IEmailProvider sender, IEmailRepository repository)
 {
     _composer = composer;
     _sender = sender;
     _repository = repository;
 }
        public void Setup()
        {
            _mockDbSettings.Setup(x => x.ConnectionString).Returns("TestConectionString");
            _mockContext.Setup(x => x.Applications).Returns(_mockDbSet.Object);
            _mockContext.Setup(x => x.SaveChanges()).Returns(1);
            _mockEmailMapper.Setup(x => x.Map(It.IsAny<Email>(), It.IsAny<Email>())).Returns(true);

            _emailRepository = new EmailRepository(_mockContext.Object,
                _mockEmailMapper.Object);
        }
 public EmailService(IEmailRepository emailRepository)
 {
     EmailRepository = emailRepository;
 }
Esempio n. 55
0
 public EmailService(IEmailRepository aEmailRepository)
 {
     theEmailRepo = aEmailRepository;
 }