Beispiel #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ScheduledProducerEngine{TItem}"/> class.
 /// </summary>
 /// <param name="executionStrategy">The execution strategy to use when producing items.</param>
 /// <param name="cancellationSourceFactory">The factory for creating cancellation sources.</param>
 /// <param name="errorHandler">The error handler to use if errors within the engine.</param>
 /// <param name="scheduler">The scheduler.</param>
 /// <param name="options">The engine configuration options.</param>
 public ScheduledProducerEngine(IProducerExecutionStrategy <TItem> executionStrategy, ICancellationSourceFactory cancellationSourceFactory, IErrorHandler errorHandler, IScheduler scheduler, ScheduledEngineOptions options)
     : base(cancellationSourceFactory)
 {
     this.executionStrategy = executionStrategy ?? throw new ArgumentNullException(nameof(executionStrategy));
     this.errorHandler      = errorHandler ?? throw new ArgumentNullException(nameof(errorHandler));
     this.scheduler         = scheduler ?? throw new ArgumentNullException(nameof(scheduler));
     this.options           = options ?? throw new ArgumentNullException(nameof(options));
 }
Beispiel #2
0
 public TestableScheduledProducerEngine(IProducerExecutionStrategy <object> executionStrategy, ICancellationSourceFactory cancellationSourceFactory, IErrorHandler errorHandler, IScheduler scheduler, ScheduledEngineOptions options)
     : base(executionStrategy, cancellationSourceFactory, errorHandler, scheduler, options)
 {
 }