Beispiel #1
0
        /// <summary>
        ///     Initiate controller with injectors.
        /// </summary>
        /// <param name="unitOfWork"></param>
        /// <param name="mapper"></param>
        /// <param name="baseTimeService"></param>
        /// <param name="relationalDbService"></param>
        /// <param name="encryptionService"></param>
        /// <param name="profileService"></param>
        /// <param name="systemBaseTimeService"></param>
        /// <param name="externalAuthenticationService"></param>
        /// <param name="sendMailService"></param>
        /// <param name="emailCacheService"></param>
        /// <param name="jwtConfigurationOptions"></param>
        /// <param name="applicationSettings"></param>
        /// <param name="logger"></param>
        /// <param name="vgyService"></param>
        /// <param name="profileCacheService"></param>
        /// <param name="captchaService"></param>
        /// <param name="realTimeService"></param>
        /// <param name="userDomain"></param>
        public UserController(
            IAppUnitOfWork unitOfWork,
            IMapper mapper,
            IBaseTimeService baseTimeService,
            IBaseRelationalDbService relationalDbService,
            IBaseEncryptionService encryptionService,
            IAppProfileService profileService,
            IBaseTimeService systemBaseTimeService,
            IExternalAuthenticationService externalAuthenticationService,
            ISendMailService sendMailService,
            IEmailCacheService emailCacheService,
            IOptions <AppJwtModel> jwtConfigurationOptions,
            IOptions <ApplicationSetting> applicationSettings,
            ILogger <UserController> logger,
            IVgyService vgyService,
            IBaseKeyValueCacheService <int, User> profileCacheService,
            ICaptchaService captchaService,

            IUserDomain userDomain) : base(
                unitOfWork, mapper, baseTimeService,
                relationalDbService, profileService)
        {
            _logger            = logger;
            _profileService    = profileService;
            _sendMailService   = sendMailService;
            _emailCacheService = emailCacheService;
            _captchaService    = captchaService;

            _userDomain = userDomain;
        }
Beispiel #2
0
 public ContactController(IContactInfoService contactInfoService, IMenuLinkService menuLinkService
                          , IMailSettingService mailSettingService
                          , ISystemSettingService systemSettingService
                          , ISendMailService sendMailService)
 {
     _contactInfoService   = contactInfoService;
     _systemSettingService = systemSettingService;
     _sendMailService      = sendMailService;
 }
 public SendMailController(
     ISendMailService sendMailService,
     IMailUtility mailUtility,
     ISendMailByGmail sendMailByGmail)
 {
     _sendMailService = sendMailService;
     _mailUtility     = mailUtility;
     _sendMailByGmail = sendMailByGmail;
 }
        public MailService(IConfiguration configuration, IServiceContext context, ISendMailService mailer, IMailRepository repository)
            : base(context)
        {
            Configuration = configuration ?? throw new ArgumentNullException(nameof(configuration));

            Mailer = mailer ?? throw new ArgumentNullException(nameof(mailer));

            Repository = repository ?? throw new ArgumentNullException(nameof(repository));
        }
Beispiel #5
0
 public PasswordRecoveryService(IUserRepository userRepository,
                                ISendMailService sendMailService,
                                IUnitOfWork unitOfWork,
                                IEncryption encryption)
 {
     _userRepository  = userRepository;
     _sendMailService = sendMailService;
     _unitOfWork      = unitOfWork;
     _encryption      = encryption;
 }
Beispiel #6
0
 public MailSettingsViewModel(IDialogService dlg, ISendMailService mailService)
     : base(dlg)
 {
     _mailService = mailService;
     _subject     = string.IsNullOrEmpty(PlugInSettings.Default.MailBetreff)
         ? PlugInSettings.Default.DefaultMailSubject
         : PlugInSettings.Default.MailBetreff;
     _body = string.IsNullOrEmpty(PlugInSettings.Default.MailText)
         ? PlugInSettings.Default.DefaultMailBody
         : PlugInSettings.Default.MailText;
 }
Beispiel #7
0
 public ErrorService(IErrorServiceRepository errorServiceRepository, IChybaFactory chybaFactory, ISendMailService sendMailService, IKnihaServiceRepository knihaServiceRepository,
                     IVytlacokServiceRepository vytlacokServiceRepository, IErrorViewModelFactory errorViewModelFactory, IPouzivatelServiceRepository pouzivatelServiceRepository)
 {
     _errorServiceRepository      = errorServiceRepository;
     _chybaFactory                = chybaFactory;
     _sendMailService             = sendMailService;
     _knihaServiceRepository      = knihaServiceRepository;
     _vytlacokServiceRepository   = vytlacokServiceRepository;
     _errorViewModelFactory       = errorViewModelFactory;
     _pouzivatelServiceRepository = pouzivatelServiceRepository;
 }
        public static ISendMailService GetInstance()
        {
            if (sendMailService == null)
            {
                lock (obj_Sync)
                {
                    sendMailService = new SendMailService();
                }
            }

            return(sendMailService);
        }
Beispiel #9
0
 public DKSController(IConfiguration config, IWebHostEnvironment webHostEnvironment, ILogger <DKSController> logger, IDKSDAO dksDao, IDevBuyPlanDAO devBuyPlanDAO, IDevTreatmentDAO devTreatmentDAO,
                      IDevTreatmentFileDAO devTreatmentFileDAO, IDevSysSetDAO devSysSetDAO, ISendMailService sendMailService, IFileService fileService, IExcelService excelService)
     : base(config, webHostEnvironment, logger)
 {
     _sendMailService     = sendMailService;
     _fileService         = fileService;
     _excelService        = excelService;
     _dksDao              = dksDao;
     _devBuyPlanDAO       = devBuyPlanDAO;
     _devTreatmentDAO     = devTreatmentDAO;
     _devTreatmentFileDAO = devTreatmentFileDAO;
     _devSysSetDAO        = devSysSetDAO;
 }
Beispiel #10
0
 public MessageService(ICommonServices services, ILanguageService languageService,
                       ITemplateEngine templateEngine, IMailSettingService mailSettingService, IMessageModelProvider modelProvider
                       , ITemplateManager templateManager, ISendMailService sendMailService, IPostService postService)
 {
     _services           = services;
     _templateEngine     = templateEngine;
     _mailSettingService = mailSettingService;
     _languageService    = languageService;
     _modelProvider      = modelProvider;
     _templateManager    = templateManager;
     _sendMailService    = sendMailService;
     _postService        = postService;
 }
Beispiel #11
0
 public MailingService(
     IAppSettings appSettings,
     IConsultantContext consultantContext,
     IQuartetClientFactory quartetClientFactory,
     IProductCatalogClientFactory productCatalogClientFactory,
     ISendMailService emailService
 )
 {
     _appSettings                 = appSettings;
     _quartetClientFactory        = quartetClientFactory;
     _productCatalogClientFactory = productCatalogClientFactory;
     _consultantContext           = consultantContext;
     _emailService                = emailService;
 }
 public HomeController(IUserService userService,
                       ISendMailService sendMailService,
                       IWorkFlowMessageService workFlowMessageService,
                       IDepartmentService departmentService,
                       IWorkContext workContext,
                       IScheduleTaskService scheduleTaskService)
 {
     _sendMailService        = sendMailService;
     _workFlowMessageService = workFlowMessageService;
     _departmentService      = departmentService;
     _workContext            = workContext;
     _userService            = userService;
     _scheduleTaskService    = scheduleTaskService;
 }
Beispiel #13
0
 public FileService(
     DBCommonContext dbcontext,
     IHttpContextAccessor httpContextAccessor,
     IAuthService AuthService,
     IConfiguration configuration,
     ISendMailService sendMailService
     )
 {
     _dbcontext           = dbcontext;
     _httpContextAccessor = httpContextAccessor;
     _configuration       = configuration;
     _filePath            = _configuration.GetValue <string>("Repository");
     _authService         = AuthService;
     _sendMailService     = sendMailService;
 }
 public IssueController(IIssueService issueService,
                        IUserService userService,
                        ISendMailService sendMailService,
                        IWorkFlowMessageService workFlowMessageService,
                        IWorkContext workContext,
                        IDepartmentService departmentService,
                        IPermissionService permissionService)
 {
     _issueService           = issueService;
     _userService            = userService;
     _sendMailService        = sendMailService;
     _workFlowMessageService = workFlowMessageService;
     _workContext            = workContext;
     _departmentService      = departmentService;
     this._permissionService = permissionService;
 }
Beispiel #15
0
 public DTRController(IMapper mapper, IConfiguration config, IWebHostEnvironment webHostEnvironment, ILogger <PictureController> logger,
                      IDKSDAO dKSDAO, IDevDtrFgtResultDAO devDtrFgtResultDAO, IArticledDAO articledDAO, IDevDtrFgtStatsDAO devDtrFgtStatsDAO, IDevDtrVsFileDAO devDtrVsFileDAO,
                      IArticlePictureDAO articlePictureDAO, IModelDahDAO modelDahDAO, IDtrLoginHistoryDAO dtrLoginHistoryDAO,
                      IFileService fileService, IExcelService excelService, ICommonService commonService, ISendMailService sendMailService)
     : base(config, webHostEnvironment, logger)
 {
     _mapper             = mapper;
     _dKSDAO             = dKSDAO;
     _devDtrFgtResultDAO = devDtrFgtResultDAO;
     _articledDAO        = articledDAO;
     _modelDahDAO        = modelDahDAO;
     _devDtrFgtStatsDAO  = devDtrFgtStatsDAO;
     _fileService        = fileService;
     _excelService       = excelService;
     _sendMailService    = sendMailService;
     _commonService      = commonService;
     _devDtrVsFileDAO    = devDtrVsFileDAO;
     _articlePictureDAO  = articlePictureDAO;
     _dtrLoginHistoryDAO = dtrLoginHistoryDAO;
 }
Beispiel #16
0
        public async Task <IActionResult> SendMail([FromServices] ISendMailService mailService, string mail, string name, string subject, string maintext)
        {
            var user = await LoginUserHelperManager.GetCurrentUser();

            MailUserDto Receiver = new MailUserDto()
            {
                Mail     = mail,
                Username = mail,
            };
            MailUserDto Sender = new MailUserDto()
            {
                Mail     = user.User.Mail,
                Username = user.UserName
            };
            MailMessageDto Message = new MailMessageDto
            {
                subject = subject,
                text    = maintext,
            };
            await mailService.SentMail(Sender, Receiver, Message);

            return(RedirectToAction("StudentView"));
        }
Beispiel #17
0
        public async Task <IActionResult> ForgotenPassword([FromServices] ISendMailService mailService, [FromServices] ISchoolHelperManager manager, string username)
        {
            var ReceiveAccount = await manager.SearchAccount(username);

            MailUserDto Receiver = new MailUserDto()
            {
                Username = username,
                Mail     = ReceiveAccount.User.Mail
            };
            MailUserDto Sender = new MailUserDto()
            {
                Username = "******",
                Mail     = "*****@*****.**",
            };
            MailMessageDto Message = new MailMessageDto()
            {
                subject = "Password",
                text    = $"Your password is {ReceiveAccount.Password}"
            };
            await mailService.SentMail(Sender, Receiver, Message);

            return(RedirectToAction("Login"));
        }
 public SpeakerController(ISpeakerService speakerService, ISendMailService mailService)
 {
     this.speakerService = speakerService;
     this.mailService = mailService;
 }
 public EmailController(ISendMailService sendMailService)
 {
     this.sendMailService = sendMailService;
 }
 public SendMailController(ISendMailService senMailService, ISubcribleService subcribleService, IAuthorizationService authorizationService)
 {
     _senMailService       = senMailService;
     _subcribleService     = subcribleService;
     _authorizationService = authorizationService;
 }
 public SendMailServiceTest()
 {
     _sendMailService = new Mock <ISendMailService>().Object;
 }
Beispiel #22
0
 public LoginService(IUnitOfWork unitOfWork, ISendMailService sendMailService)
 {
     _unitOfWork      = unitOfWork;
     _sendMailService = sendMailService;
 }
 public SendMailHostedService(IServiceProvider serviceProvider, IEmailRepository emailRepository, ISendMailService sendMailService)
 {
     ServiceProvider  = serviceProvider;
     _emailRepository = emailRepository;
     _sendMailService = sendMailService;
 }
 public ImageController(IImageServices imageService, ISendMailService sendMailService)
 {
     this.imageService    = imageService;
     this.sendMailService = sendMailService;
 }
Beispiel #25
0
 public OrderChangesConsumer(IOrdersService ordersService, ISendMailService sendMailService)
 {
     _ordersService   = ordersService;
     _sendMailService = sendMailService;
 }
 public NotificationMessageProcessor(ISendMailService sendMail)
 {
     this._sendMailService = sendMail;
 }
 public SpeakerController(ISpeakerService speakerService, ISendMailService mailService)
 {
     this._speakerService = speakerService;
     this.mailService     = mailService;
 }
        public EmailJob(ISendMailService service, IMailRepository repository)
        {
            Server = service ?? throw new ArgumentNullException(nameof(service));

            Repository = repository ?? throw new ArgumentNullException(nameof(repository));
        }