Exemplo n.º 1
0
 public ProcessManager(
     WebshopDbContext db,
     PaymentClient paymentClient,
     MailerClient mailerClient,
     ILogger <ProcessManager> logger)
 {
     _db            = db;
     _paymentClient = paymentClient;
     _mailerClient  = mailerClient;
     _logger        = logger;
 }
Exemplo n.º 2
0
        public MailerNotifier()
        {
            // Initializing 2 instances of EmailMessage in order to
            // deserialize FeedbackRecipients and MailerFromAddress.
            // Deserializing each onto same instance overwrites value of
            // the initial deserialization
            _testEmailIndicator = AppSettings.Env == "Staging" || AppSettings.Env == "Development" ? "[TEST EMAIL] " : "";
            _emailMessage       = new EmailMessage();
            _appName            = AppSettings.ApiName;
            EmailMessage emailMessage = new EmailMessage();

            _mailerClient = MailerClient.MailerClientInstance;
            _emailMessage = JsonConvert.DeserializeObject <EmailMessage>(AppSettings.FeedbackRecipients);
            emailMessage  = JsonConvert.DeserializeObject <EmailMessage>(AppSettings.MailerFromAddress);
            _emailMessage.FromAddresses = emailMessage.FromAddresses;
        }