public SalesViewModel(IProductService productService, ITicketService ticketService, IEventAggregator eventAggregator, INotifyService notifyService) { _productService = productService; _ticketService = ticketService; _eventAggregator = eventAggregator; _notifyService = notifyService; }
public KrisLogger(INotifyService notify, IHttpContextAccessor accessor) { _accessor = accessor; _ip = _accessor?.HttpContext?.Connection.RemoteIpAddress?.ToString(); _notify = notify; _log = LogManager.GetLogger("LOG"); }
private static void FactoryDesignPattern() { NotifyFactory notifyFactory = new NotifyFactory(); INotifyService notify = notifyFactory.Create("MAIL"); notify.Send(new CreationalPatterns.Factory.User()); }
public Board(List <Player> players, List <Role> roles, INotifyService notifyService) { this.players = players; this.roles = roles; this.notifier = notifyService; isRolesAssigned = false; }
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(); }
public MessagingService(IMessagingRepository repository, IUserService userService, INotifyService notifyService) { _repository = repository; _userService = userService; _notifyService = notifyService; }
public ProductsController(IProductService productService, IWarehouseService warehouseService, INotifyService notifyService, ILogger <ProductsController> logger) { _productService = productService; _warehouseService = warehouseService; _notifyService = notifyService; _logger = logger; }
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; }
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; }
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; }
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; }
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; }
public JobController(IJobService jobService, IFilterService filterService, IMailService mailService, ISmsService smsService, INotifyService notifyService) { _jobService = jobService; _filterService = filterService; _mailService = mailService; _notifyService = notifyService; _smsService = smsService; }
public DocumentPublishCancelMessageEventHandler( IPublishDocumentTaskRepository publishDocumentTaskRepository, ILogger <DocumentPublishCancelMessageEventHandler> logger, INotifyService notifyService, IDocumentPublishCancelQueueService documentPublishCancelQueueService) : base(publishDocumentTaskRepository, logger, notifyService, documentPublishCancelQueueService) { _logger = logger ?? throw new ArgumentNullException(nameof(logger)); }
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)); }
public CandidatesController( ICandidateAccessTokenService accessTokenService, INotifyService notifyService, ICrmService crm) { _accessTokenService = accessTokenService; _notifyService = notifyService; _crm = crm; }
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; }
/// <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; }
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; }
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()); }
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; }
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)); }
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)); }); }
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; }
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; }
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; }
/// <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)); }
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 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; }
public void RegisterNotificationService(INotifyService service) { if (!services.Contains(service)) services.Add(service); }
public CashupService(ISession session, INotifyService notifyService) { _session = session; _notifyService = notifyService; }
public CommerceService(ITradingPostApiWrapper tpWrapper, INotifyService notifyService) { _tpWrapper = tpWrapper; _notifyService = notifyService; }