示例#1
0
        public void OneTimeSetUp()
        {
            _smartEventHubConsumer = new SmartEventHubConsumer(_eventHubSettings.ConnectionString, _eventHubSettings.Name);

            _cts = new CancellationTokenSource();
            _    = _smartEventHubConsumer.ReceiveEventsFromDeviceAsync(_cts.Token);
        }
        public TailCommandProcessor(IConfiguration configuration, IWebHostEnvironment environment)
        {
            _configuration = configuration;
            _environment   = environment;

            _eventHubConnectionString = _configuration.GetValue <string>("ControlAVPEventHubConnectionString");
            _eventHubName             = _configuration.GetValue <string>("ControlAVPEventHubName");

            _smartEventHubConsumer = new SmartEventHubConsumer(_eventHubConnectionString, _eventHubName);

            _cts = new CancellationTokenSource();
            _    = _smartEventHubConsumer.ReceiveEventsFromDeviceAsync(_cts.Token);
        }