コード例 #1
0
ファイル: ServiceWorker.cs プロジェクト: wooly905/TurtleTrade
        protected ServiceWorker(IBaseData baseData)
        {
            State                = ServiceWorkerState.Initializing;
            BaseData             = baseData;
            SystemConfig         = baseData.SystemConfig;
            Country              = baseData.Country;
            _notificationService = baseData.GetNotificationService();

            TestStatus = baseData.RunInTestMode;
            _testTime  = DateTime.Now;

            State = ServiceWorkerState.Initialized;
        }
コード例 #2
0
 public INofiticationService GetNotificationService()
 {
     return(_nofiticationService ?? (_nofiticationService = new TurtleEmailService(GetLogger(), SystemConfig.SMTPInfo)));
 }
コード例 #3
0
 /// <summary>
 /// Initializes a new order processing object.
 /// </summary>
 /// <param name="inventoryService">The inventory managing service object.</param>
 /// <param name="paymentService">The payment service to use with the orderprocessor.</param>
 /// <param name="notificationService">The notification service to inform customers about their processed order.</param>
 public OrderProcessor(IInventoryService inventoryService, IPaymentService paymentService, INofiticationService notificationService)
 {
     _inventoryService    = inventoryService;
     _paymentService      = paymentService;
     _notificationService = notificationService;
 }