Exemplo n.º 1
0
 public SalesViewModel(IProductService productService, ITicketService ticketService, IEventAggregator eventAggregator, INotifyService notifyService)
 {
     _productService = productService;
     _ticketService = ticketService;
     _eventAggregator = eventAggregator;
     _notifyService = notifyService;
 }
Exemplo n.º 2
0
 public KrisLogger(INotifyService notify, IHttpContextAccessor accessor)
 {
     _accessor = accessor;
     _ip       = _accessor?.HttpContext?.Connection.RemoteIpAddress?.ToString();
     _notify   = notify;
     _log      = LogManager.GetLogger("LOG");
 }
Exemplo n.º 3
0
        private static void FactoryDesignPattern()
        {
            NotifyFactory  notifyFactory = new NotifyFactory();
            INotifyService notify        = notifyFactory.Create("MAIL");

            notify.Send(new CreationalPatterns.Factory.User());
        }
Exemplo n.º 4
0
 public Board(List <Player> players, List <Role> roles, INotifyService notifyService)
 {
     this.players    = players;
     this.roles      = roles;
     this.notifier   = notifyService;
     isRolesAssigned = false;
 }
Exemplo n.º 5
0
        public void SendNotifications(IMessageService messageService, INotifyService notifyService, TimeSpan timeSpan)
        {
            var messages      = messageService.GetNewerThan(DateTime.Now - timeSpan);
            var notifications = new List <Notification>();

            foreach (var message in messages)
            {
                var recipients = new List <string>();
                message.Receivers.ForEach(r => recipients.Add(r.Email));
                message.CC.ForEach(cc => recipients.Add(cc.Email));
                message.BCC.ForEach(bcc => recipients.Add(bcc.Email));

                var content = new NotificationContent()
                {
                    Sender  = message.Sender.Email,
                    Subject = message.Subject,
                    Body    = message.MessageBody
                };

                notifications.AddRange(recipients.Select(r => new Notification()
                {
                    Content        = JsonConvert.SerializeObject(content),
                    ContentType    = "application/json",
                    RecipientsList = new List <string> {
                        r
                    },
                    WithAttachments = message.Attachments.Any()
                }));
            }

            notifyService.SendNotifications(notifications);
            notifyService.UpdateConfig();
        }
Exemplo n.º 6
0
 public MessagingService(IMessagingRepository repository, IUserService userService,
                         INotifyService notifyService)
 {
     _repository    = repository;
     _userService   = userService;
     _notifyService = notifyService;
 }
Exemplo n.º 7
0
 public ProductsController(IProductService productService, IWarehouseService warehouseService,
                           INotifyService notifyService, ILogger <ProductsController> logger)
 {
     _productService   = productService;
     _warehouseService = warehouseService;
     _notifyService    = notifyService;
     _logger           = logger;
 }
Exemplo n.º 8
0
 public BackupTask(INotifyService notifyService, IStorageProvider storageProvider, IConfiguration configuration, BackupOptions backupOptions, MongoConfiguration mongoConfiguration)
 {
     this.notifyService      = notifyService;
     this.storageProvider    = storageProvider;
     this.configuration      = configuration;
     this.backupOptions      = backupOptions;
     this.mongoConfiguration = mongoConfiguration;
 }
Exemplo n.º 9
0
        public CloseCashViewModel(ICashupService cashupService, INotifyService notifyService)
        {
            _cashupService = cashupService;
            _notifyService = notifyService;

            Payments = new ObservableCollection<Payment>(_cashupService.GetPaymentsNotClosed());
            Timestamp = DateTime.Now;
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="NotificationService"/> class.
 /// </summary>
 /// <param name="loggerFactory">The logger factory.</param>
 /// <param name="options">The options.</param>
 /// <param name="policyRegistry">The policy registry.</param>
 public NotificationService(ILoggerFactory loggerFactory, IOptions <NotificationServiceOptions> options, IPolicyRegistry <string> policyRegistry, INotifyService notifyService)
 {
     _logger         = loggerFactory.CreateLogger(GetType());
     _loggerFactory  = loggerFactory;
     _options        = options.Value;
     _policyRegistry = policyRegistry;
     _notifyService  = notifyService;
 }
Exemplo n.º 11
0
 public BackupTask(INotifyService notifyService, IStorageProvider storageProvider, IConfiguration configuration, BackupOptions backupOptions, MySqlOptions mySqlOptions)
 {
     this.notifyService   = notifyService;
     this.storageProvider = storageProvider;
     this.configuration   = configuration;
     this.backupOptions   = backupOptions;
     this.mySqlOptions    = mySqlOptions;
 }
Exemplo n.º 12
0
 public MonitorService(INotifyService notifyService, IEventPublisher eventPublisher, IDBTargetRepository dbTargetRepository, IConfiguration configuration, ILogger <MonitorService> logger)
 {
     _eventPublisher     = eventPublisher;
     _dbTargetRepository = dbTargetRepository;
     _configuration      = configuration;
     _logger             = logger;
     _notifyService      = notifyService;
 }
 public BackupTask(INotifyService notifyService, IStorageProvider storageProvider, IConfiguration configuration, BackupOptions backupOptions, PostresConfiguration postresConfiguration)
 {
     this.notifyService        = notifyService;
     this.storageProvider      = storageProvider;
     this.configuration        = configuration;
     this.backupOptions        = backupOptions;
     this.postresConfiguration = postresConfiguration;
 }
Exemplo n.º 14
0
 public WxPayController(wx.IWxPayPaymentService service, PaymentContext context, ILogger <WxPayController> logger, SignatureService signatureService, INotifyService notifyService)
 {
     this.paymentService   = service;
     this.context          = context;
     this.logger           = logger;
     this.signatureService = signatureService;
     this.notifyService    = notifyService;
 }
Exemplo n.º 15
0
 public JobController(IJobService jobService, IFilterService filterService, IMailService mailService, ISmsService smsService, INotifyService notifyService)
 {
     _jobService    = jobService;
     _filterService = filterService;
     _mailService   = mailService;
     _notifyService = notifyService;
     _smsService    = smsService;
 }
Exemplo n.º 16
0
 public DocumentPublishCancelMessageEventHandler(
     IPublishDocumentTaskRepository publishDocumentTaskRepository,
     ILogger <DocumentPublishCancelMessageEventHandler> logger,
     INotifyService notifyService,
     IDocumentPublishCancelQueueService documentPublishCancelQueueService)
     : base(publishDocumentTaskRepository, logger, notifyService, documentPublishCancelQueueService)
 {
     _logger = logger ?? throw new ArgumentNullException(nameof(logger));
 }
Exemplo n.º 17
0
 public NotifyPresenter(
     INotifyService service,
     IGeneralSetting setting,
     ILogWriter logWriter)
 {
     _service   = service ?? throw new ArgumentNullException(nameof(service));
     _setting   = setting ?? throw new ArgumentNullException(nameof(setting));
     _logWriter = logWriter ?? throw new ArgumentNullException(nameof(logWriter));
 }
Exemplo n.º 18
0
 public CandidatesController(
     ICandidateAccessTokenService accessTokenService,
     INotifyService notifyService,
     ICrmService crm)
 {
     _accessTokenService = accessTokenService;
     _notifyService      = notifyService;
     _crm = crm;
 }
Exemplo n.º 19
0
 public UserBusiness(IOptions <AppSettings> appSettings, IEncryptionUtil encryptionUtil, INotifyService notifyService, IUserService userService, IUserClaimService userClaimService, IMapper mapper)
 {
     _appSettings      = appSettings;
     _userService      = userService;
     _userClaimService = userClaimService;
     _mapper           = mapper;
     _encryptionUtil   = encryptionUtil;
     _notifyService    = notifyService;
 }
Exemplo n.º 20
0
        /// <summary>
        /// 初始化 Alipay.NotifyBase 类的新实例。
        /// </summary>
        /// <param name="service">通知请求验证服务。</param>
        /// <param name="parameters">通知请求参数。</param>
        /// <param name="config">支付宝默认配置。</param>
        public NotifyBase(INotifyService service,
                          IDictionary <string, string> parameters, AlipayConfig config)
            : base(config)
        {
            parameters.ToList().ForEach(
                p => this.Parameters.Add(p.Key, p.Value)
                );

            _notifyService = service;
        }
Exemplo n.º 21
0
 public OpportunityResponseBusiness(ILookupService lookupService, IFileService fileService, INotifyService notifyService, IKeyValueService keyValueService, IOpportunityResponseService opportunityResponseService, IOpportunityService opportunityService, IMapper mapper)
 {
     _lookupService              = lookupService;
     _fileService                = fileService;
     _notifyService              = notifyService;
     _keyValueService            = keyValueService;
     _opportunityResponseService = opportunityResponseService;
     _opportunityService         = opportunityService;
     _mapper = mapper;
 }
Exemplo n.º 22
0
        static void Main(string[] args)
        {
            var smsService  = new SmsService();
            var mailService = new MailService();

            var notifiyServices = new INotifyService[] { smsService, mailService };
            var videoEncoder    = new VideoEncoder(notifiyServices);

            videoEncoder.Encode(new Video());
        }
Exemplo n.º 23
0
 public OrderBo(IOrderDal orderDal, IOrderDetailDal orderDetailDal, IOrderHistoryBo orderHistoryBo, IThirdPartyLogBo thirdPartyLogBo, IDistrictBoCached districtBoCached, IWardBoCached wardBoCached, IUserService userService, INotifyService notifyService)
 {
     this._orderDal         = orderDal;
     this._orderDetailDal   = orderDetailDal;
     this._orderHistoryBo   = orderHistoryBo;
     this._thirdPartyLogBo  = thirdPartyLogBo;
     this._districtBoCached = districtBoCached;
     this._wardBoCached     = wardBoCached;
     this._userService      = userService;
     this._notifyService    = notifyService;
 }
 public CandidatesController(
     ICandidateAccessTokenService accessTokenService,
     INotifyService notifyService,
     ICrmService crm,
     IAppSettings appSettings)
 {
     _accessTokenService = accessTokenService;
     _notifyService      = notifyService;
     _crm         = crm;
     _appSettings = appSettings;
 }
Exemplo n.º 25
0
 public AccountController(IUserService userService,
                          INotifyService notifyService,
                          IDataProtectionProvider dataProtectionProvider,
                          ILogger <AccountController> logger,
                          IApplicationContextAccessor applicationContextAccessor)
 {
     _userService                = userService;
     _notifyService              = notifyService;
     _dataProtectionProvider     = dataProtectionProvider;
     _applicationContextAccessor = applicationContextAccessor;
     _logger = logger;
 }
        public MonitorViewModel(ISizeProvider provider, INotifyService notifyService)
        {
            if (provider == null) throw new ArgumentNullException("provider");
            if (notifyService == null) throw new ArgumentNullException("notifyService");

            _provider = provider;
            _notifyService = notifyService;

            provider.SizeChanged += ProviderSizeChanged;

            GetSnapshot();
        }
 protected BaseDocumentMessageEventHandler(
     IPublishDocumentTaskRepository publishDocumentTaskRepository,
     ILogger <BaseDocumentMessageEventHandler <TEventMessage, TEventBus> > logger,
     INotifyService notifyService,
     TEventBus eventBus)
 {
     PublishDocumentTaskRepository = publishDocumentTaskRepository ??
                                     throw new ArgumentNullException(nameof(publishDocumentTaskRepository));
     _logger       = logger ?? throw new ArgumentNullException(nameof(logger));
     NotifyService = notifyService ?? throw new ArgumentNullException(nameof(notifyService));
     EventBus      = eventBus ?? throw new ArgumentNullException(nameof(eventBus));
 }
Exemplo n.º 28
0
        public EventDetailViewModel(IPictureSaver pictureSaver, IEventsService eventsService, INotifyService notifyService)
        {
            _pictureSaver        = pictureSaver;
            _eventsService       = eventsService;
            _notifyService       = notifyService;
            AddPictureCommand    = new RelayCommand <Picture>(AddPicture);
            ResetPicturesCommand = new RelayCommand(ResetPictures);

            MessagingCenter.Subscribe <IPictureTaker, string>(this, "pictureTaken", (sender, arg) =>
            {
                AddPictureCommand.Execute(new Picture(arg));
            });
        }
Exemplo n.º 29
0
 public VehicleService(IHttpContextAccessor httpContextAccessor,
                       IUserRepository userRepository,
                       IOrderRepository orderRepository,
                       IVehicleRepository vehicleRepository,
                       INotifyService notifyService,
                       ILogger <VehicleService> logger) : base(httpContextAccessor)
 {
     _userRepository    = userRepository;
     _orderRepository   = orderRepository;
     _vehicleRepository = vehicleRepository;
     _notifyService     = notifyService;
     _logger            = logger;
 }
Exemplo n.º 30
0
        public BaseRepository()
        {
            var str = ConfigurationManager.AppSettings.Get("notify_service");

            if (str == "email")
            {
                _notifyService = new Email();
            }

            if (str == "textfile")
            {
                _notifyService = new TextFileLog(ConfigurationManager.AppSettings.Get("textfile_path"));
            }
        }
 public OperationsController(
     ICrmService crm,
     IStore store,
     INotifyService notifyService,
     IHangfireService hangfire,
     IRedisService redis,
     IEnv env)
 {
     _store         = store;
     _crm           = crm;
     _notifyService = notifyService;
     _hangfire      = hangfire;
     _redis         = redis;
     _env           = env;
 }
Exemplo n.º 32
0
 public UpsertCandidateJob(
     IEnv env,
     ICrmService crm,
     INotifyService notifyService,
     IPerformContextAdapter contextAdapter,
     IMetricService metrics,
     ILogger <UpsertCandidateJob> logger)
     : base(env)
 {
     _crm            = crm;
     _notifyService  = notifyService;
     _contextAdapter = contextAdapter;
     _metrics        = metrics;
     _logger         = logger;
 }
Exemplo n.º 33
0
 /// <summary>
 ///     Create new instance.
 /// </summary>
 public IncidentService(
     IOptions <IncidentOptions> options,
     IContactRepository contactRepository,
     IIncidentRepository incidentRepository,
     IGeocoderTranslation geocoderTranslation,
     INotifyService notificationService,
     ILogger <IncidentService> logger)
 {
     _options             = options?.Value ?? throw new ArgumentNullException(nameof(options));
     _contactRepository   = contactRepository ?? throw new ArgumentNullException(nameof(contactRepository));
     _incidentRepository  = incidentRepository ?? throw new ArgumentNullException(nameof(incidentRepository));
     _geocoderTranslation = geocoderTranslation ?? throw new ArgumentNullException(nameof(geocoderTranslation));
     _notifyService       = notificationService ?? throw new ArgumentNullException(nameof(notificationService));
     _logger = logger ?? throw new ArgumentNullException(nameof(logger));
 }
Exemplo n.º 34
0
        public BaseRepository()
        {
            var str = ConfigurationManager.AppSettings.Get("notify_service");

            if (str=="email")
            {
                    _notifyService = new Email();
            }

            if (str=="textfile")
            {

                _notifyService = new TextFileLog(ConfigurationManager.AppSettings.Get("textfile_path"));
            }
        }
Exemplo n.º 35
0
 public OrderPosWorkflow(INotifyService notifyService, InventoryAdjustmentNoteFactory inventoryAdjustmentNoteFactory,  InventoryAdjustmentNoteWfManager inventoryAdjustmentNoteWfManager, ICostCentreRepository costCentreRepository, IInvoiceFactory invoiceFactory, IInvoiceRepository invoiceRepository, IConfirmInvoiceWorkFlowManager invoiceWorkFlowManager, IReceiptWorkFlowManager receiptWorkFlowManager, IReceiptFactory receiptFactory, IGetDocumentReference getDocumentReference, IOutgoingCommandEnvelopeRouter commandEnvelopeRouter)
 {
   
     _inventoryAdjustmentNoteFactory = inventoryAdjustmentNoteFactory;
     
     _inventoryAdjustmentNoteWfManager = inventoryAdjustmentNoteWfManager;
     _costCentreRepository = costCentreRepository;
     _invoiceFactory = invoiceFactory;
     _invoiceRepository = invoiceRepository;
     _invoiceWorkFlowManager = invoiceWorkFlowManager;
     _receiptWorkFlowManager = receiptWorkFlowManager;
     _receiptFactory = receiptFactory;
     _getDocumentReference = getDocumentReference;
     _commandEnvelopeRouter = commandEnvelopeRouter;
    
     _notifyService = notifyService;
 }
Exemplo n.º 36
0
 public void RegisterNotificationService(INotifyService service)
 {
     if (!services.Contains(service))
         services.Add(service);
 }
Exemplo n.º 37
0
 public CashupService(ISession session, INotifyService notifyService)
 {
     _session = session;
     _notifyService = notifyService;
 }
Exemplo n.º 38
0
 public CommerceService(ITradingPostApiWrapper tpWrapper, INotifyService notifyService)
 {
     _tpWrapper = tpWrapper;
     _notifyService = notifyService;
 }