public void Configure(SwitchConfig config)
        {
            var command = new SwitchActionCommand();

            config.Configure(command);
            _commander.Execute(command);
        }
        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);
        }