public NotificationPublisher_Tests() { _store = Substitute.For<INotificationStore>(); _backgroundJobManager = Substitute.For<IBackgroundJobManager>(); _publisher = new NotificationPublisher(_store, _backgroundJobManager); }
/// <summary> /// Initializes a new instance of the <see cref="NotificationPublisher"/> class. /// </summary> public NotificationPublisher( INotificationStore store, IBackgroundJobManager backgroundJobManager) { _store = store; _backgroundJobManager = backgroundJobManager; AbpSession = NullAbpSession.Instance; }
public SynchronizeUserInfoWorker(AbpTimer timer, IBackgroundJobManager backgroundJobManager ) : base(timer) { _backgroundJobManager = backgroundJobManager; timer.Period = int.Parse(TimeSpan.FromDays(7).TotalMilliseconds.ToString()); }
/// <summary> /// Initializes a new instance of the <see cref="NotificationPublisher"/> class. /// </summary> public NotificationPublisher( INotificationStore store, IBackgroundJobManager backgroundJobManager ) { _store = store; _backgroundJobManager = backgroundJobManager; }
public OrderAdminAppService( IBackgroundJobManager backgroundJobManager, IRepository <Order> repository, IRepository <ExpressCompany> expressCompanyRepository) : base(repository) { _backgroundJobManager = backgroundJobManager; ExpressCompanyRepository = expressCompanyRepository; }
public NotificationPublisher_Tests() { _store = Substitute.For<INotificationStore>(); _backgroundJobManager = Substitute.For<IBackgroundJobManager>(); _publisher = new NotificationPublisher(_store, _backgroundJobManager, Substitute.For<INotificationDistributer>()); _publisher.UnitOfWorkManager = Substitute.For<IUnitOfWorkManager>(); _publisher.UnitOfWorkManager.Current.Returns(Substitute.For<IActiveUnitOfWork>()); }
public WebhookPublisher_Tests() { AbpSession.UserId = 1; AbpSession.TenantId = null; _backgroundJobManagerSubstitute = RegisterFake<IBackgroundJobManager>(); _webhookPublisher = Resolve<IWebhookPublisher>(); }
public MailKitSmtpEmailSender(ISmtpEmailSenderConfiguration smtpConfiguration, IBackgroundJobManager backgroundJobManager, IOptions <AbpMailKitOptions> abpMailKitConfiguration) : base(smtpConfiguration, backgroundJobManager) { AbpMailKitOptions = abpMailKitConfiguration.Value; SmtpConfiguration = smtpConfiguration; }
public NotificationPublisher_Tests() { _store = Substitute.For <INotificationStore>(); _backgroundJobManager = Substitute.For <IBackgroundJobManager>(); _publisher = new NotificationPublisher(_store, _backgroundJobManager, Substitute.For <INotificationConfiguration>(), SequentialGuidGenerator.Instance, LocalIocManager); _publisher.UnitOfWorkManager = Substitute.For <IUnitOfWorkManager>(); _publisher.UnitOfWorkManager.Current.Returns(Substitute.For <IActiveUnitOfWork>()); }
public NotificationPublisher_Tests() { _store = Substitute.For <INotificationStore>(); _backgroundJobManager = Substitute.For <IBackgroundJobManager>(); _publisher = new NotificationPublisher(_store, _backgroundJobManager, Substitute.For <INotificationDistributer>()); _publisher.UnitOfWorkManager = Substitute.For <IUnitOfWorkManager>(); _publisher.UnitOfWorkManager.Current.Returns(Substitute.For <IActiveUnitOfWork>()); }
public TestService(IBackgroundJobManager backgroundJobManager, IDapperRepository <TaskModel> dapperRepository, INotificationPublisher notificationPublisher) { this._backgroundJobManager = backgroundJobManager; this._notificationPublisher = notificationPublisher; this._dapperRepository = dapperRepository; }
public AlibabaCallbackMessageAppService( IRepository <CallbackMessage, long> repository, IBackgroundJobManager _backgroundJobManager ) : base(repository) { backgroundJobManager = _backgroundJobManager; }
/// <summary> /// Initializes a new instance of the <see cref="NotificationManager"/> class. /// </summary> public NotificationManager( INotificationStore store, IBackgroundJobManager backgroundJobManager) { _store = store; _backgroundJobManager = backgroundJobManager; Logger = NullLogger.Instance; }
public TacticPeopleEventHandler( TacticManager tacticManager, PersonManager personManager, IBackgroundJobManager backgroundJobManager) { _tacticManager = tacticManager; _personManager = personManager; _backgroundJobManager = backgroundJobManager; }
public CheckDelayJobs(AbpTimer timer, ProcessTaskManager processTaskManager, TacticManager tacticManager, IBackgroundJobManager backgroundJobManager) : base(timer) { Timer.Period = 60 * 1000 * 60 * 2; //2小时执行一次 _processTaskManager = processTaskManager; _tacticManager = tacticManager; _backgroundJobManager = backgroundJobManager; }
public TaskReportEventHandler( TacticManager tacticManager, ProcessTaskReportManager processTaskReportManager, IBackgroundJobManager backgroundJobManager) { _tacticManager = tacticManager; _backgroundJobManager = backgroundJobManager; _processTaskReportManager = processTaskReportManager; }
/// <summary> /// Enqueues a job to be executed. /// </summary> /// <typeparam name="TJob">Type of the job.</typeparam> /// <typeparam name="TArgs">Type of the arguments of job.</typeparam> /// <param name="backgroundJobManager">Background job manager reference</param> /// <param name="args">Job arguments.</param> /// <param name="priority">Job priority.</param> /// <param name="delay">Job delay (wait duration before first try).</param> public static void Enqueue <TJob, TArgs>( [NotNull] this IBackgroundJobManager backgroundJobManager, [NotNull] TArgs args, BackgroundJobPriority priority = BackgroundJobPriority.Normal, TimeSpan?delay = null) where TJob : IBackgroundJob <TArgs> { AsyncHelper.RunSync(() => backgroundJobManager.EnqueueAsync <TJob, TArgs>(args, priority, delay)); }
public ShipmentTrackSyncJob( IUnitOfWorkManager unitOfWorkManager, IBackgroundJobManager backgroundJobManager, TenantManager tenantManager) { this._unitOfWorkManager = unitOfWorkManager; this._backgroundJobManager = backgroundJobManager; this._tenantManager = tenantManager; }
public AwsS3Service(IBackgroundJobManager backgroundJobManager) { _backgroundJobManager = backgroundJobManager; _bucketName = ConfigurationManager.AppSettings["Amazon.AwsS3UploadJob.BucketName"]; _accessKeyID = ConfigurationManager.AppSettings["Amazon.AwsS3UploadJob.AccessKeyID"]; _secretKey = ConfigurationManager.AppSettings["Amazon.AwsS3UploadJob.SecretKey"]; _client = GetClient(); }
public NotificationAppService(IRepository <PhoneNotification> repository, IBackgroundJobManager backgroundJobManager, IRepository <SendNotificationsStatus> statusRepository, IRepository <Student> studentRepository, IRepository <Feed> feedRepository, IRepository <PhoneNotification> phoneNotificationsRepository) { _repository = repository; _backgroundJobManager = backgroundJobManager; _statusRepository = statusRepository; _studentRepository = studentRepository; _feedRepository = feedRepository; _phoneNotificationsRepository = phoneNotificationsRepository; }
/// <summary> /// Initializes a new instance of the <see cref="NotificationPublisher"/> class. /// </summary> public NotificationPublisher( INotificationRepository notificationRepository, IBackgroundJobManager backgroundJobManager, INotificationDistributer notificationDistributer) { _notificationRepository = notificationRepository; _backgroundJobManager = backgroundJobManager; _notificationDistributer = notificationDistributer; }
public EditionAppService( EditionManager editionManager, IRepository <SubscribableEdition> subscribableEditionRepository, IRepository <Tenant> tenantRepository, IBackgroundJobManager backgroundJobManager) { _editionManager = editionManager; _subscribableEditionRepository = subscribableEditionRepository; _tenantRepository = tenantRepository; _backgroundJobManager = backgroundJobManager; }
/// <summary> /// 周期任务扩展 /// </summary> /// <typeparam name="TJob"></typeparam> /// <typeparam name="TArgs"></typeparam> /// <param name="jobManager"></param> /// <param name="args"></param> /// <param name="cron"></param> public static void AddOrUpdate <TJob, TArgs>(this IBackgroundJobManager jobManager, TArgs args, string cron = null) where TJob : IBackgroundJob <TArgs> { if (string.IsNullOrEmpty(cron)) { cron = PeriodicCorn.Daily(0); } RecurringJob.AddOrUpdate <TJob>(job => job.Execute(args), cron, TimeZoneInfo.Local); }
public TransactionAppService(IRepository <Transaction, Guid> transactionRepository, IRepository <Account, Guid> accountRepository, ISessionAppService sessionAppService, ICurrencyRateAppService currencyRateExchangeService, IRepository <TransactionComment, Guid> transactionCommentRepository, PiggySettings settings, IBackgroundJobManager backgroundJobManager) { _transactionRepository = transactionRepository; _accountRepository = accountRepository; _sessionAppService = sessionAppService; _currencyRateExchangeService = currencyRateExchangeService; _transactionCommentRepository = transactionCommentRepository; _settings = settings; _backgroundJobManager = backgroundJobManager; }
public PaymentAppService(IBackgroundJobManager backgroundJobManager, UserManager userManager, PaymentManager paymentManager, IAbpSession session) { _backgroundJobManager = backgroundJobManager; _userManager = userManager; _paymentManager = paymentManager; _session = session; }
public static Task EnqueueEventAsync <TEventData>( this IBackgroundJobManager backgroundJobManager, TEventData eventData, BackgroundJobPriority priority = BackgroundJobPriority.Normal, TimeSpan?delay = null ) where TEventData : EventData { return(backgroundJobManager.EnqueueAsync <EventTriggerAsyncBackgroundJob <TEventData>, TEventData>(eventData, priority, delay)); }
/// <summary> /// Initializes a new instance of the <see cref="NotificationPublisher"/> class. /// </summary> public NotificationPublisher( INotificationStore store, IBackgroundJobManager backgroundJobManager, INotificationDistributer notificationDistributer) { _store = store; _backgroundJobManager = backgroundJobManager; _notificationDistributer = notificationDistributer; AbpSession = NullAbpSession.Instance; }
protected NotificationEventHandlerBase( IExternalUserLookupServiceProvider userLookupServiceProvider, IBackgroundJobManager backgroundJobManager, IEmailService emailService, ILogger <TEventHandler> logger) { UserLookupServiceProvider = userLookupServiceProvider; BackgroundJobManager = backgroundJobManager; EmailService = emailService; Logger = logger; }
public CrossTenantPermissionHandler( IBackgroundJobManager backgroundJobManager, IRepository <Tenant> tenantRepository, IRepository <CrossTenantPermission> crossTenantPermissionRepository ) { _backgroundJobManager = backgroundJobManager; _tenantRepository = tenantRepository; _crossTenantPermissionRepository = crossTenantPermissionRepository; }
public CustomerInvoiceHandler( IBackgroundJobManager backgroundJobManager, IRepository <CustomerInvoice> invoiceRepository, IRepository <CustomerInvoiceDetail> invoiceDetailRepository ) { _backgroundJobManager = backgroundJobManager; _invoiceRepository = invoiceRepository; _invoiceDetailRepository = invoiceDetailRepository; }
public OrderSyncJob( IUnitOfWorkManager unitOfWorkManager, IBackgroundJobManager backgroundJobManager, TenantManager tenantManager, OrderSyncSingleJob orderSyncSingleJob) { this._unitOfWorkManager = unitOfWorkManager; this._backgroundJobManager = backgroundJobManager; this._tenantManager = tenantManager; this._orderSyncSingleJob = orderSyncSingleJob; }
/// <summary> /// Initializes a new instance of the <see cref="NotificationPublisher"/> class. /// </summary> public NotificationPublisher( INotificationStore store, IBackgroundJobManager backgroundJobManager, INotificationDistributer notificationDistributer, IGuidGenerator guidGenerator) { _store = store; _backgroundJobManager = backgroundJobManager; _notificationDistributer = notificationDistributer; _guidGenerator = guidGenerator; CodeZeroSession = NullCodeZeroSession.Instance; }
/// <summary> /// Initializes a new instance of the <see cref="NotificationPublisher" /> class. /// </summary> public NotificationPublisher( INotificationStore store, IBackgroundJobManager backgroundJobManager, INotificationDistributer notificationDistributer, IGuidGenerator guidGenerator) { this.store = store; this.backgroundJobManager = backgroundJobManager; this.notificationDistributer = notificationDistributer; this.guidGenerator = guidGenerator; StudioXSession = NullStudioXSession.Instance; }
public UserAppService(RoleManager roleManager, IEnumerable <IPasswordValidator <User> > passwordValidators, INotificationPublisher notificationPublisher, IBackgroundJobManager backgroundJobManager, IPasswordHasher <User> passwordHasher) { _passwordHasher = passwordHasher; _passwordValidators = passwordValidators; _roleManager = roleManager; _notificationPublisher = notificationPublisher; _backgroundJobManager = backgroundJobManager; }
public NotificationManager( INotificationStore store, INotificationDefinitionManager notificationDefinitionManager, IUnitOfWorkManager unitOfWorkManager, IBackgroundJobManager backgroundJobManager) { _store = store; _notificationDefinitionManager = notificationDefinitionManager; _unitOfWorkManager = unitOfWorkManager; _backgroundJobManager = backgroundJobManager; Logger = NullLogger.Instance; }
public PrivateEmailAppService(IBackgroundJobManager backgroundJobManager, INotificationPublisher notificationPublisher) { _backgroundJobManager = backgroundJobManager; _notificationPublisher = notificationPublisher; }
public SeasonalProductsController(IBackgroundJobManager jobManager, IIdStore idStore, ILogger logger) : base(idStore, logger) { _product = new SeasonalProducts(); _jobManager = jobManager; }
public PrivateEmailAppService(IBackgroundJobManager backgroundJobManager) { _backgroundJobManager = backgroundJobManager; }
public QueueController(ILogger logger, IBackgroundJobManager manager, IIdStore store) : base(store, logger) { _jobManager = manager; _jobs = new Jobs(); }