public ReaderService(
            IReaderConnectionManager readerConnectionManager,
            IAsciiSerialTransportConsumer consumer,
            TslReaderInfo readerInfo,
            SwitchAsynchronousResponder switchResponder,
            SwitchConfig switchConfig,
            ITagMonitor tagMonitor,
            BarcodeConfig barcodeConfig,
            IBarcodeMonitor barcodeMonitor,
            InventoryConfig config)
        {
            _consumer       = consumer;
            _commander      = consumer as IAsciiCommander;
            _connection     = readerConnectionManager;
            _info           = readerInfo;
            _tagMonitor     = tagMonitor;
            _barcodeMonitor = barcodeMonitor;
            SwitchConfig    = switchConfig;
            InventoryConfig = config;
            BarcodeConfig   = barcodeConfig;

            _connection.ConnectionStateChanged += ConnectionStateChanged;
            switchResponder.SwitchStateChanged += (sender, e) =>
                                                  switchConfig.SwitchStateChanged?.Invoke(this, e);
        }
        public void GetInventory(InventoryConfig config)
        {
            var command = new InventoryCommand();

            config.Configure(command);
            command.TakeNoAction = false;
            _tagMonitor.OnTagReceived(command);
            _commander.Execute(command);
        }
        public async Task Configure(InventoryConfig config)
        {
            var command = new InventoryCommand();

            config.Configure(command);
            await Task.Run(() =>
            {
                try
                {
                    _commander.Execute(command);
                }
                catch (Exception ex)
                {
                    LogException(ex.Message);
                }
            });
        }