Esempio n. 1
0
        /// <summary>
        /// Creates a new <see cref="EmailViewResult"/>.
        /// </summary>
#if ASPNET5
        public EmailViewResult(Email email, IEmailViewRenderer renderer, IEmailParser parser, IServiceProvider serviceProvider, RequestUrl url)
        {
            Email       = email;
            Renderer    = renderer ?? new EmailViewRenderer(serviceProvider);
            Parser      = parser ?? new EmailParser(Renderer, url);
            _requestUrl = url;
        }
Esempio n. 2
0
        /// <summary>
        /// Creates a new <see cref="EmailViewResult"/>.
        /// </summary>
#if ASPNET5
        public EmailViewResult(Email email, IEmailViewRenderer renderer, IEmailParser parser, IServiceProvider serviceProvider)
        {
            var requestFeature = serviceProvider.GetRequiredService <Microsoft.AspNetCore.Http.Features.IHttpRequestFeature>();

            Email    = email;
            Renderer = renderer ?? new EmailViewRenderer(serviceProvider);
            Parser   = parser ?? new EmailParser(Renderer, requestFeature);
        }
Esempio n. 3
0
 public AdminController(ITeamRepository teamRepository, UserManager <User> userManager, ITransactionHistoryRepository transactionHistoryRepository,
                        IMapper mapper, IEmailSender emailSender, IEmailViewRenderer emailViewRenderer, IOptions <AppSettings> appSettings)
 {
     UserManager    = userManager;
     TeamRepository = teamRepository;
     TransactionHistoryRepository = transactionHistoryRepository;
     Mapper            = mapper;
     EmailSender       = emailSender;
     EmailViewRenderer = emailViewRenderer;
     AppSettings       = appSettings.Value;
 }
Esempio n. 4
0
 public AccountController(
     UserManager <User> userManager,
     SignInManager <User> signInManager,
     IEmailSender emailSender,
     ILoggerFactory loggerFactory,
     IEmailViewRenderer emailViewRenderer)
 {
     UserManager       = userManager;
     SignInManager     = signInManager;
     EmailSender       = emailSender;
     Logger            = loggerFactory.CreateLogger <AccountController>();
     EmailViewRenderer = emailViewRenderer;
 }
Esempio n. 5
0
 public CheckoutController(ITeamRepository teamRepository, UserManager <User> userManager,
                           IOptions <AppSettings> appSettings, IPaymentService paymentService,
                           ITransactionHistoryRepository transactionHistoryRepository, IEmailViewRenderer emailViewRenderer,
                           IMapper mapper, IEmailSender emailSender)
 {
     TeamRepository = teamRepository;
     UserManager    = userManager;
     AppSettings    = appSettings.Value;
     PaymentService = paymentService;
     TransactionHistoryRepository = transactionHistoryRepository;
     EmailViewRenderer            = emailViewRenderer;
     Mapper      = mapper;
     EmailSender = emailSender;
 }
Esempio n. 6
0
 /// <summary>
 /// Creates a new <see cref="EmailService"/>.
 /// </summary>
 public EmailService(IEmailViewRenderer emailViewRenderer, IEmailParser emailParser, Func <SmtpClient> createSmtpClient)
 {
     this.emailViewRenderer = emailViewRenderer;
     this.emailParser       = emailParser;
     this.createSmtpClient  = createSmtpClient;
 }
 public SimpleEmailService(IEmailViewRenderer emailViewRenderer, IEmailParser emailParser, AmazonSimpleEmailService amazonSimpleEmailService)
 {
     _emailViewRenderer  = emailViewRenderer;
     _simpleEmailService = amazonSimpleEmailService;
     _emailParser        = emailParser;
 }
 public SimpleEmailService(IEmailViewRenderer emailViewRenderer)
 {
     _emailViewRenderer  = emailViewRenderer;
     _simpleEmailService = AWSClientFactory.CreateAmazonSimpleEmailServiceClient();
     _emailParser        = new EmailParser(emailViewRenderer);
 }
Esempio n. 9
0
 /// <summary>
 /// Creates a new <see cref="EmailParser"/>.
 /// </summary>
 public EmailParser(IEmailViewRenderer alternativeViewRenderer)
 {
     this.alternativeViewRenderer = alternativeViewRenderer;
 }
Esempio n. 10
0
 /// <summary>
 /// Creates a new <see cref="EmailService"/>.
 /// </summary>
 public EmailService(IEmailViewRenderer emailViewRenderer, IEmailParser emailParser, Func<SmtpClient> createSmtpClient)
 {
     this.emailViewRenderer = emailViewRenderer;
     this.emailParser = emailParser;
     this.createSmtpClient = createSmtpClient;
 }
Esempio n. 11
0
 public EmailParser(IEmailViewRenderer alternativeViewRenderer, Microsoft.AspNetCore.Http.Features.IHttpRequestFeature requsetFeature)
 {
     this.alternativeViewRenderer = alternativeViewRenderer;
     _requsetFeature = requsetFeature;
 }
Esempio n. 12
0
 public EmailParser(IEmailViewRenderer alternativeViewRenderer, RequestUrl url)
 {
     this.alternativeViewRenderer = alternativeViewRenderer;
     _url = url;
 }
Esempio n. 13
0
 public SendGridMessageFactory(IEmailViewRenderer renderer) : base(renderer)
 {
 }
 public MailMessageFactory(IEmailViewRenderer renderer)
 {
     _renderer = renderer;
 }
Esempio n. 15
0
 public EmailViewResult(Email email, IEmailViewRenderer renderer, IEmailParser parser)
 {
     Email    = email;
     Renderer = renderer ?? new EmailViewRenderer(ViewEngineCollection);
     Parser   = parser ?? new EmailParser(Renderer);
 }
 public SimpleEmailService(IEmailViewRenderer emailViewRenderer)
 {
     _emailViewRenderer = emailViewRenderer;
     _simpleEmailService = AWSClientFactory.CreateAmazonSimpleEmailServiceClient();
     _emailParser = new EmailParser(emailViewRenderer);
 }
Esempio n. 17
0
 /// <summary>
 /// Creates a new <see cref="EmailViewResult"/>.
 /// </summary>
 public EmailViewResult(Email email, IEmailViewRenderer renderer, IEmailParser parser)
 {
     Email = email;
     Renderer = renderer ?? new EmailViewRenderer(ViewEngineCollection);
     Parser = parser ?? new EmailParser(Renderer);
 }
Esempio n. 18
0
 /// <param name="viewEngines">The view engines to use when creating email views.</param>
 /// <param name="url">The URL of the current request. This is for the UrlHelper used when generating Urls in a view. When null, this is determined from the current HttpContext instead.</param>
 /// <param name="createSmtpClient">A function that creates a <see cref="SmtpClient"/>. If null, a default creation function is used.</param>
 public EmailService(ViewEngineCollection viewEngines, Uri url = null, Func<SmtpClient> createSmtpClient = null)
 {
     emailViewRenderer = new EmailViewRenderer(viewEngines, url);
     emailParser = new EmailParser(emailViewRenderer);
     this.createSmtpClient = createSmtpClient ?? (() => new SmtpClient());
 }
 public SimpleEmailService(IEmailViewRenderer emailViewRenderer, IEmailParser emailParser, AmazonSimpleEmailService amazonSimpleEmailService)
 {
     _emailViewRenderer = emailViewRenderer;
     _simpleEmailService = amazonSimpleEmailService;
     _emailParser = emailParser;
 }