コード例 #1
0
 public RegisterCommand(ApplicationContext db, ISendMail sendMail)
 {
     this.db       = db;
     this.sendMail = sendMail;
     encryption    = new Encryption();
     verification  = new Verification();
 }
コード例 #2
0
 public HomeService(
     ApplicationDbContext context,
     ISendMail sendMail)
 {
     this.context  = context;
     this.sendMail = sendMail;
 }
コード例 #3
0
 public static void TrySend(this ISendMail sender, IEmailMessage message)
 {
     if (sender != null)
     {
         sender.Send(message);
     }
 }
コード例 #4
0
 public HomeController(IUtilidad _util, IGirlsRepository _girls, IWebHostEnvironment _hostEnv, ISendMail _sendMail)
 {
     util     = _util;
     girls    = _girls;
     hostEnv  = _hostEnv;
     sendMail = _sendMail;
 }
コード例 #5
0
        private void CreateService()
        {
            var builder = new DbContextOptionsBuilder <SMContext>().UseSqlServer("Server=.\\SQLEXPRESS;Database=MariaDB;Trusted_Connection=True;");

            _SMContext = new SMContext(builder.Options);
            _ISendMail = new SendMail(_SMContext);
        }
コード例 #6
0
ファイル: MailReceiver.cs プロジェクト: groma84/IwAutoUpdater
 public MailReceiver(string to, string from, AddressUsernamePassword mailSettings, ISendMail sendMail)
 {
     _to = to;
     _from = from;
     _sendMail = sendMail;
     _mailSettings = mailSettings;
 }
コード例 #7
0
ファイル: MailReceiver.cs プロジェクト: groma84/IwAutoUpdater
 public MailReceiver(string receiverMailAddress, string senderAddress, string pickupDirectory, ISendMail sendMail)
 {
     _to = receiverMailAddress;
     _from = senderAddress;
     _pickupDirectory = pickupDirectory;
     _sendMail = sendMail;
 }
コード例 #8
0
 public void Send(ISendMail mailSender)
 {
     if (mailSender == null)
     {
         throw new ArgumentNullException("mailSender");
     }
     mailSender.Send(Build());
 }
コード例 #9
0
 public AdminController(IUtilidad _util, ITypesRepository _types, IHttpContextAccessor _httpContext, IUserAdmRepository _userAdm, ISendMail _sendMail)
 {
     util        = _util;
     types       = _types;
     userAdm     = _userAdm;
     sendMail    = _sendMail;
     httpContext = _httpContext;
 }
コード例 #10
0
 public PerformMigrateUsfAgreementDataWork(ICommandEntities entities
                                           , ISendMail mailSender
                                           , ILogExceptions exceptionLogger
                                           )
 {
     _entities        = entities;
     _mailSender      = mailSender;
     _exceptionLogger = exceptionLogger;
 }
コード例 #11
0
 public PerformComposeRegionsWork(ICommandEntities entities
                                  , ISendMail mailSender
                                  , ILogExceptions exceptionLogger
                                  )
 {
     _entities        = entities;
     _mailSender      = mailSender;
     _exceptionLogger = exceptionLogger;
 }
コード例 #12
0
 /// <summary>
 /// Costruttore della classe
 /// </summary>
 /// <param name="maxMailPerMinute">
 /// Il massimo numero di mail al minuto che il server tollera, oltre il quale agiscono i
 /// sistemi di antispam e le mail in più vengono droppate.
 /// </param>
 public MailEnqueuerWithFlowControl(
     ISendMail sendMail,
     int maxMailPerMinute,
     int maxRecipientCount)
 {
     this.sendMail          = sendMail;
     this.maxMailPerMinute  = maxMailPerMinute;
     this.maxRecipientCount = maxRecipientCount;
 }
コード例 #13
0
 public HRFacadeWithNotification(IEmployeeRepository employeeRepository, IWorkSheetRepository workSheetRepository,
                                 IHRFactory factory, IPayCalculator payCalculator, ISendMail mailSender)
 {
     this.employeeRepository  = employeeRepository;
     this.workSheetRepository = workSheetRepository;
     this.factory             = factory;
     this.payCalculator       = payCalculator;
     this.mailSender          = mailSender;
 }
コード例 #14
0
 public SupplyFacadeWithNotification(ISupplierRepository supplierRepository, IPartRepository partRepository,
                                     ISupplyFactory factory, IOrderingRiskEvaluator evaluator, ISendMail mailSender)
 {
     this.supplierRepository = supplierRepository;
     this.partRepository     = partRepository;
     this.factory            = factory;
     this.evaluator          = evaluator;
     this.mailSender         = mailSender;
 }
コード例 #15
0
 /// <summary>
 /// The send.
 /// </summary>
 /// <param name="sendMail">
 /// The send Mail.
 /// </param>
 /// <param name="fromAddress">
 /// The from address.
 /// </param>
 /// <param name="toAddress">
 /// The to address.
 /// </param>
 /// <param name="subject">
 /// The subject.
 /// </param>
 /// <param name="bodyText">
 /// The body text.
 /// </param>
 public static void Send(
     [NotNull] this ISendMail sendMail,
     [NotNull] MailAddress fromAddress,
     [NotNull] MailAddress toAddress,
     [CanBeNull] string subject,
     [CanBeNull] string bodyText)
 {
     sendMail.Send(fromAddress, toAddress, subject, bodyText, null);
 }
コード例 #16
0
 public AplicacionController(IUtilidad _util, IGirlsRepository _girls, IWebHostEnvironment _hostEnv, ISendMail _sendMail, IProfileGirlsRepository _profileGirls, IGaleriaGirlsRepository _galeriaGirls, IHttpContextAccessor _httpContext)
 {
     util         = _util;
     girls        = _girls;
     hostEnv      = _hostEnv;
     sendMail     = _sendMail;
     httpContext  = _httpContext;
     profileGirls = _profileGirls;
     galeriaGirls = _galeriaGirls;
 }
コード例 #17
0
 public GarageServiceFacadeWithNotification(ICustomerRepository customerRepository,
                                            IGarageServiceRepository garageServiceRepository, IGarageServiceProvider provider,
                                            IGarageServiceFactory factory, ISendMail mailSender)
 {
     this.customerRepository      = customerRepository;
     this.garageServiceRepository = garageServiceRepository;
     this.provider   = provider;
     this.factory    = factory;
     this.mailSender = mailSender;
 }
コード例 #18
0
        /// <summary>
        /// Initializes a new instance of the <see cref="YafSendMailThreaded"/> class.
        /// </summary>
        /// <param name="sendMail">
        /// The send mail.
        /// </param>
        /// <param name="logger">
        /// The logger.
        /// </param>
        /// <param name="mailRepository">
        /// The mail Repository.
        /// </param>
        public YafSendMailThreaded([NotNull] ISendMail sendMail, ILogger logger, IRepository <Mail> mailRepository)
        {
            this.SendMail       = sendMail;
            this.Logger         = logger;
            this.MailRepository = mailRepository;

            var rand = new Random();

            this._uniqueId = rand.Next();
        }
コード例 #19
0
 public SendEmailMessageHandler(IProcessQueries queryProcessor
                                , ICommandEntities entities
                                , ISendMail mailSender
                                , ILogExceptions exceptionLogger
                                )
 {
     _queryProcessor  = queryProcessor;
     _entities        = entities;
     _mailSender      = mailSender;
     _exceptionLogger = exceptionLogger;
 }
コード例 #20
0
        /// <summary>
        /// 創建
        /// </summary>
        /// <param name="sendBy">透過誰來幫忙送信</param>
        /// <returns></returns>
        public ISendMail Create(SendBy sendBy)
        {
            ISendMail sendMailAsync = sendBy switch
            {
                SendBy.Normal => new NormalSendMail(_config),
                SendBy.SendGrid => new SendGridSendMail(_config, _serviceProvider),
                _ => null,
            };

            return(sendMailAsync);
        }
コード例 #21
0
 public PerformLoadPacificOceanToponymsWork(IProcessQueries queryProcessor
                                            , IQueryEntities entities
                                            , ISendMail mailSender
                                            , ILogExceptions exceptionLogger
                                            )
 {
     _queryProcessor  = queryProcessor;
     _entities        = entities;
     _mailSender      = mailSender;
     _exceptionLogger = exceptionLogger;
 }
コード例 #22
0
 public RegistroController(IUtilidad _util, IGirlsRepository _girls, IWebHostEnvironment _hostEnv, ISendMail _sendMail, IProfileGirlsRepository _profileGirls, IChangePasswordRepository _changePassword, IHttpContextAccessor _httpContext, ITypesRepository _types)
 {
     util           = _util;
     girls          = _girls;
     types          = _types;
     hostEnv        = _hostEnv;
     sendMail       = _sendMail;
     httpContext    = _httpContext;
     profileGirls   = _profileGirls;
     changePassword = _changePassword;
 }
コード例 #23
0
 public PerformFixDuplicateMexicosWork(IProcessQueries queryProcessor
                                       , IQueryEntities entities
                                       , ISendMail mailSender
                                       , ILogExceptions exceptionLogger
                                       )
 {
     _queryProcessor  = queryProcessor;
     _entities        = entities;
     _mailSender      = mailSender;
     _exceptionLogger = exceptionLogger;
 }
コード例 #24
0
 public PerformCanonilizeOceansWork(IQueryEntities entities
                                    , ISendMail mailSender
                                    , ILogExceptions exceptionLogger
                                    , IHandleCommands <UpdatePlace> updatePlace
                                    )
 {
     _entities        = entities;
     _mailSender      = mailSender;
     _exceptionLogger = exceptionLogger;
     _updatePlace     = updatePlace;
 }
コード例 #25
0
 public ViewBooksService(
     ApplicationDbContext context,
     IGenreService genreService,
     INotificationService messageService,
     ISendMail sendMail)
 {
     this.context        = context;
     this.genreService   = genreService;
     this.messageService = messageService;
     this.sendMail       = sendMail;
 }
コード例 #26
0
 public PerformRepairPlaceHierarchiesWork(IQueryEntities entities
                                          , ISendMail mailSender
                                          , IHandleCommands <EnsurePlaceHierarchies> placeNodes
                                          , ILogExceptions exceptionLogger
                                          )
 {
     _entities        = entities;
     _mailSender      = mailSender;
     _placeNodes      = placeNodes;
     _exceptionLogger = exceptionLogger;
 }
コード例 #27
0
        /// <summary>
        /// The send.
        /// </summary>
        /// <param name="sendMail">
        /// The send Mail.
        /// </param>
        /// <param name="fromEmail">
        /// The from email.
        /// </param>
        /// <param name="toEmail">
        /// The to email.
        /// </param>
        /// <param name="subject">
        /// The subject.
        /// </param>
        /// <param name="body">
        /// The body.
        /// </param>
        public static void Send(
            [NotNull] this ISendMail sendMail,
            [NotNull] string fromEmail,
            [NotNull] string toEmail,
            [CanBeNull] string subject,
            [CanBeNull] string body)
        {
            CodeContracts.VerifyNotNull(fromEmail, "fromEmail");
            CodeContracts.VerifyNotNull(toEmail, "toEmail");

            sendMail.Send(new MailAddress(fromEmail), new MailAddress(toEmail), subject, body);
        }
コード例 #28
0
 /// <summary>
 /// The send.
 /// </summary>
 /// <param name="sendMail">
 /// The send mail.
 /// </param>
 /// <param name="fromEmail">
 /// The from email.
 /// </param>
 /// <param name="fromName">
 /// The from name.
 /// </param>
 /// <param name="toEmail">
 /// The to email.
 /// </param>
 /// <param name="toName">
 /// The to name.
 /// </param>
 /// <param name="subject">
 /// The subject.
 /// </param>
 /// <param name="bodyText">
 /// The body text.
 /// </param>
 /// <param name="bodyHtml">
 /// The body html.
 /// </param>
 public static void Send(
     [NotNull] this ISendMail sendMail,
     [NotNull] string fromEmail,
     [CanBeNull] string fromName,
     [NotNull] string toEmail,
     [CanBeNull] string toName,
     [CanBeNull] string subject,
     [CanBeNull] string bodyText,
     [CanBeNull] string bodyHtml)
 {
     sendMail.Send(new MailAddress(fromEmail, fromName), new MailAddress(toEmail, toName), subject, bodyText, bodyHtml);
 }
コード例 #29
0
 public PerformProjectEmployeeSummaryViewsWork(EmployeePlacesViewBuilder placesBuilder
                                               , EmployeePlacesViewProjector placesProjector
                                               , EmployeeActivityCountsViewBuilder activityCountsBuilder
                                               , EmployeeActivityCountsViewProjector activityCountsProjector, ISendMail mailSender, ILogExceptions exceptionLogger)
 {
     _placesBuilder           = placesBuilder;
     _placesProjector         = placesProjector;
     _activityCountsBuilder   = activityCountsBuilder;
     _activityCountsProjector = activityCountsProjector;
     _mailSender      = mailSender;
     _exceptionLogger = exceptionLogger;
 }
コード例 #30
0
 public PerformSeedAtlanticOceanWork(IProcessQueries queryProcessor
                                     , ISendMail mailSender
                                     , ILogExceptions exceptionLogger
                                     , IContainGeoPlanet geoPlanet
                                     , IContainGeoNames geoNames
                                     )
 {
     _queryProcessor  = queryProcessor;
     _mailSender      = mailSender;
     _exceptionLogger = exceptionLogger;
     _geoPlanet       = geoPlanet;
     _geoNames        = geoNames;
 }
コード例 #31
0
 public OnUsfUserCreated(IProcessQueries queryProcessor
                         , ICommandEntities entities
                         , IHandleCommands <ImportUsfPerson> commandHandler
                         , ILogExceptions exceptionLogger
                         , ISendMail mailSender
                         )
 {
     _queryProcessor  = queryProcessor;
     _entities        = entities;
     _commandHandler  = commandHandler;
     _exceptionLogger = exceptionLogger;
     _mailSender      = mailSender;
 }
コード例 #32
0
 public AuthController(UserManager <User> userManager,
                       SignInManager <User> signInManager,
                       IConfiguration configuration,
                       IOptions <AppSettings> appSettings,
                       ISendMail sendMail,
                       IMapper mapper)
 {
     _userManager   = userManager;
     _signInManager = signInManager;
     _configuration = configuration;
     _appSettings   = appSettings;
     _sendMail      = sendMail;
     _mapper        = mapper;
 }
 /// <summary>
 /// Creates a new instance of the service class.
 /// </summary>
 /// <param name="clusterOperator"></param>
 /// <param name="mailer"></param>
 /// <param name="stateManager"></param>
 /// <param name="serviceContext"></param>
 /// <param name="config"></param>
 public ClusterService(
     IClusterOperator clusterOperator,
     ISendMail mailer,
     IApplicationDeployService applicationDeployService,
     IReliableStateManager stateManager,
     StatefulServiceContext serviceContext,
     ClusterConfig config)
     : base(serviceContext, stateManager as IReliableStateManagerReplica)
 {
     this.config = config;
     this.clusterOperator = clusterOperator;
     this.applicationDeployService = applicationDeployService;
     this.mailer = mailer;
 }
        /// <summary>
        /// Creates a new instance of the service class.
        /// </summary>
        /// <param name="clusterOperator"></param>
        /// <param name="mailer"></param>
        /// <param name="stateManager"></param>
        /// <param name="serviceParameters"></param>
        /// <param name="config"></param>
        public ClusterService(
            IClusterOperator clusterOperator,
            ISendMail mailer,
            IApplicationDeployService applicationDeployService,
            IReliableStateManager stateManager,
            StatefulServiceParameters serviceParameters,
            ClusterConfig config)
        {
            this.config = config;
            this.clusterOperator = clusterOperator;
            this.applicationDeployService = applicationDeployService;
            this.mailer = mailer;
            this.StateManager = stateManager;
            this.serviceParameters = serviceParameters;

            this.ConfigureService();
        }
コード例 #35
0
 INotificationReceiver INotificationReceiverFactory.CreateMailReceiver(string receiverMailAddress, string senderAddress, ISendMail sendMail, string pickupDirectory)
 {
     throw new NotImplementedException();
 }
コード例 #36
0
 public ForgotPasswordMailService(ISendMail sendMail, ITemplateService templateService)
 {
     _sendMail = sendMail;
     _templateService = templateService;
 }
コード例 #37
0
ファイル: UserController.cs プロジェクト: Rokory/DebReg
        //public UserController(
        //    IUnitOfWork unitOfWork,
        //    TournamentRegistrationsManager tournamentRegistrationsManager,
        //    ISendMail sendMail,
        //    OrganizationManager organizationManager,
        //    ISecurityManager securityManager,
        //    ICountryManager countryManager,
        //    ITournamentManager tournamentManager)
        //{
        //    this.unitOfWork = unitOfWork;
        //    this.tournamentRegistrationsManager = tournamentRegistrationsManager;
        //    this.sendMail = sendMail;
        //    this.organizationManager = organizationManager;
        //    this.userManager = this.UserManager;
        //    this.securityManager = securityManager;
        //    this.countryManager = countryManager;
        //    this.tournamentManager = tournamentManager;
        //}

        public UserController(
            IUnitOfWork unitOfWork,
            TournamentRegistrationsManager tournamentRegistrationsManager,
            ISendMail sendMail,
            OrganizationManager organizationManager,
            DebRegUserManager userManager,
            ISecurityManager securityManager,
            ICountryManager countryManager,
            ITournamentManager tournamentManager)
        {
            this.unitOfWork = unitOfWork;
            this.tournamentRegistrationsManager = tournamentRegistrationsManager;
            this.sendMail = sendMail;
            this.organizationManager = organizationManager;
            this.securityManager = securityManager;
            this.countryManager = countryManager;
            this.tournamentManager = tournamentManager;
            this.userManager = userManager;
        }
コード例 #38
0
 INotificationReceiver INotificationReceiverFactory.CreateMailReceiver(string receiverMailAddress, string senderAddress, ISendMail sendMail, AddressUsernamePassword mailSettings)
 {
     ++CreateMailReceiverCalled;
     return CreateMailReceiver;
 }
コード例 #39
0
 public void Send(ISendMail mailSender)
 {
     if (mailSender == null) throw new ArgumentNullException("mailSender");
     mailSender.Send(Build());
 }
コード例 #40
0
ファイル: Service.cs プロジェクト: slieser/sandbox2
 internal Service(ISendMail sendMail) {
     this.sendMail = sendMail;
 }
コード例 #41
0
 INotificationReceiver INotificationReceiverFactory.CreateMailReceiver(string receiverMailAddress, string senderAddress, ISendMail sendMail, AddressUsernamePassword mailSettings)
 {
     return new MailReceiver(receiverMailAddress, senderAddress, mailSettings, sendMail);
 }
コード例 #42
0
 INotificationReceiver INotificationReceiverFactory.CreateMailReceiver(string receiverMailAddress, string senderAddress, ISendMail sendMail, string pickupDirectory)
 {
     return new MailReceiver(receiverMailAddress, senderAddress, pickupDirectory, sendMail);
 }
コード例 #43
0
 public WelcomeMailService(ISendMail mailService, ITemplateService templateService)
 {
     _mailService = mailService;
     _templateService = templateService;
 }
コード例 #44
0
ファイル: Form1.cs プロジェクト: unicloud/AFRP
        private int SendEmailCDO()
        {
            BaseMailAccount _Sender = CreateSender();

            BaseMailAccount _Receiver = CreateReceiver();

            _SendMail = new NetSelfSend();

            return _SendMail.SendTest(_Sender, _Receiver);
        }
コード例 #45
0
 public AccountController(ITokenHandler tokenStore, IMembershipService membershipService, ISendMail sendMail)
 {
     _tokenStore = tokenStore;
     _membershipService = membershipService;
     _sendMail = sendMail;
 }
コード例 #46
0
ファイル: Form1.cs プロジェクト: unicloud/AFRP
        private int SendEmailLumisoft()
        {
            BaseMailAccount _Sender = CreateSender();

            BaseMailAccount _Receiver = CreateReceiver();

            _SendMail = new LumiSoftSend();

            return _SendMail.SendTest(_Sender, _Receiver);
        }
コード例 #47
0
 public ConfigurationConverter(IUpdatePackageFactory updatePackageAccessFactory, INotificationReceiverFactory notificationReceiverFactory, ISendMail sendMail)
 {
     _updatePackageFactory = updatePackageAccessFactory;
     _notificationReceiverFactory = notificationReceiverFactory;
     _sendMail = sendMail;
 }