public IotHubListener(
     IEventProcessorFactory iotHubEventProcessorFactory,
     IEventProcessorHostConfig eventProcessorHostConfig,
     IOptions <EventProcessorOptions> eventProcessorOptions)
 {
     this.iotHubEventProcessorFactory = iotHubEventProcessorFactory;
     this.eventProcessorHostConfig    = eventProcessorHostConfig;
     this.eventProcessorOptions       = eventProcessorOptions?.Value;
 }
Example #2
0
 /// <summary>
 /// Create host wrapper
 /// </summary>
 /// <param name="factory"></param>
 /// <param name="hub"></param>
 /// <param name="config"></param>
 /// <param name="checkpoint"></param>
 /// <param name="lease"></param>
 /// <param name="logger"></param>
 public EventProcessorHost(IEventProcessorFactory factory, IEventHubConsumerConfig hub,
                           IEventProcessorHostConfig config, ICheckpointManager checkpoint,
                           ILeaseManager lease, ILogger logger)
 {
     _logger     = logger ?? throw new ArgumentNullException(nameof(logger));
     _hub        = hub ?? throw new ArgumentNullException(nameof(hub));
     _config     = config ?? throw new ArgumentNullException(nameof(config));
     _factory    = factory ?? throw new ArgumentNullException(nameof(factory));
     _lease      = lease;
     _checkpoint = checkpoint;
     _lock       = new SemaphoreSlim(1, 1);
 }
Example #3
0
 /// <summary>
 /// Create host wrapper
 /// </summary>
 /// <param name="factory"></param>
 /// <param name="hub"></param>
 /// <param name="config"></param>
 /// <param name="logger"></param>
 public EventProcessorHost(IEventProcessorFactory factory, IEventHubConsumerConfig hub,
                           IEventProcessorHostConfig config, ILogger logger) :
     this(factory, hub, config, null, null, logger)
 {
 }