/// <summary>
        /// Intializes the Merchant Email handler
        /// </summary>
        public void Initialize()
        {
            Log.Verbose("Initializing {0}", this.GetType().Name);

            _userServicesAddress = new Uri(CloudConfigurationManager.GetSetting(UserServicesAddress));
            _userServicesClient  = new UserServiceClient(_userServicesAddress);

            _emailFromAddressTestAccount = CloudConfigurationManager.GetSetting(EmailFromAddressTestAccount);
            _emailFromDisplay            = CloudConfigurationManager.GetSetting(FromDisplay);

            _merchantEmailFromAddress = CloudConfigurationManager.GetSetting(MerchantEmailFromAddress);
            _emailContentCreator      = new MerchantReportContentCreator();
            _emailContentCreator.Initialize();

            Log.Verbose("Initialized {0}", this.GetType().Name);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Intializes the Deals Email handler
        /// </summary>
        public void Initialize()
        {
            Log.Verbose("Initializing {0}", this.GetType().Name);

            string storageSetting = CloudConfigurationManager.GetSetting(StorageSetting);

            _userHistoryStorage = new UserHistoryStorage(storageSetting);

            _userServicesAddress = new Uri(CloudConfigurationManager.GetSetting(UserServicesAddress));
            _userServicesClient  = new UserServiceClient(_userServicesAddress);

            _emailFromAddress            = CloudConfigurationManager.GetSetting(EmailFromAddress);
            _emailFromAddressTestAccount = CloudConfigurationManager.GetSetting(EmailFromAddressTestAccount);
            _emailFromDisplay            = CloudConfigurationManager.GetSetting(FromDisplay);

            _emailContentCreator = new DealsEmailContentCreator();
            _emailContentCreator.Initialize();

            Log.Verbose("Initialized {0}", this.GetType().Name);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Intializes the Remainder Email handler
        /// </summary>
        public void Initialize()
        {
            Log.Verbose("Initializing {0}", this.GetType().Name);

            string storageSetting = CloudConfigurationManager.GetSetting(StorageSetting);

            _userHistoryStorage  = new UserHistoryStorage(storageSetting);
            _userServicesAddress = new Uri(CloudConfigurationManager.GetSetting(UserServicesAddress));
            _userServicesClient  = new UserServiceClient(_userServicesAddress);

            _emailFromAddress            = CloudConfigurationManager.GetSetting(EmailFromAddress);
            _emailFromAddressTestAccount = CloudConfigurationManager.GetSetting(EmailFromAddressTestAccount);
            _emailFromDisplay            = CloudConfigurationManager.GetSetting(FromDisplay);

            _windowsBetweenRemainderEmails = TimeSpan.Parse(CloudConfigurationManager.GetSetting(WindowBetweenRemainderEmails));
            _mailHistoryLookback           = int.Parse(CloudConfigurationManager.GetSetting(MailHistoryLookBackSetting));
            _emailContentCreator           = new RemainderEmailContentCreator();
            _emailContentCreator.Initialize();

            Log.Verbose("Initialized {0}", this.GetType().Name);
        }