Exemplo n.º 1
0
        public HeartRateHostedService(string connectionString, string storageConnectionString, ILogger <HeartRateHostedService> logger, IHeartRateHubServices temperatureHubService)
        {
            _logger = logger ?? throw new ArgumentNullException("Logger ILogger<HeartRateHostedService> is null");
            _temperatureHubService = temperatureHubService ?? throw new ArgumentNullException("TemperatureHub service is null");
            if (string.IsNullOrEmpty(connectionString))
            {
                throw new ArgumentNullException(nameof(connectionString));
            }
            EhConnectionString      = connectionString;
            StorageConnectionString = storageConnectionString;

            eventProcessorHost = new EventProcessorHost(
                EhEntityPath,
                PartitionReceiver.DefaultConsumerGroupName,
                EhConnectionString,
                StorageConnectionString,
                StorageContainerName);
        }
Exemplo n.º 2
0
 public EventHubProcessor(IHeartRateHubServices temperatureHubService)
 {
     _temperatureHubService = temperatureHubService ?? throw new ArgumentNullException("TemperatureHubServices is null");
 }