public AsyncEventProcessor(Func <IAsyncEventWorker> asyncEventWorkerFunc, IAsyncEventQueueManager asyncEventQueueManager, IInMemoryJobScheduler jobScheduler, IAsyncEventPipelineConfiguration asyncEventPipelineConfiguration) { this.asyncEventWorkerFunc = asyncEventWorkerFunc; this.asyncEventQueueManager = asyncEventQueueManager; this.jobScheduler = jobScheduler; this.asyncEventPipelineConfiguration = asyncEventPipelineConfiguration; }
public ProcessBufferedNotificationsJobHandler(IBufferGovernor[] bufferGovernors, ICrudRepository crudRepository, INotificationPipeline[] notificationPipelines, INotificationSerializer notificationSerializer, IInMemoryJobScheduler inMemoryJobScheduler) { this.bufferGovernors = bufferGovernors; this.crudRepository = crudRepository; this.notificationPipelines = notificationPipelines; this.notificationSerializer = notificationSerializer; this.inMemoryJobScheduler = inMemoryJobScheduler; }
public ProcessBufferedNotificationsJobHandlerTests() { bufferGovernor1 = Substitute.For <IBufferGovernor>(); bufferGovernor1.Id.Returns(Guid.NewGuid()); inMemoryCrudRepository = new InMemoryCrudRepository(); notificationSerializer = Substitute.For <INotificationSerializer>(); notificationPipeline1 = Substitute.For <INotificationPipeline>(); notificationPipeline1.Id.Returns(Guid.NewGuid()); notificationPipeline2 = Substitute.For <INotificationPipeline>(); notificationPipeline2.Id.Returns(Guid.NewGuid()); inMemoryJobScheduler = Substitute.For <IInMemoryJobScheduler>(); notificationSerializer.FromJson(null).ReturnsForAnyArgs(ci => new TestNotification() { Data = ci.ArgAt <SerializedNotification>(0).NotificationJson, TypeName = ci.ArgAt <SerializedNotification>(0).NotificationClassName }); sut = new ProcessBufferedNotificationsJobHandler(new[] { bufferGovernor1 }, inMemoryCrudRepository, new[] { notificationPipeline1, notificationPipeline2 }, notificationSerializer, inMemoryJobScheduler); }
public BufferedNotificationStartup(IInMemoryJobScheduler inMemoryJobScheduler) { this.inMemoryJobScheduler = inMemoryJobScheduler; }