Exemplo n.º 1
0
        public BeIDCardConnector Connect(string readerName)
        {
            CheckContextIsEstablished();
            var connection = _context.Connect(readerName, SCardShare.Shared, SCardProtocols.T0);

            return(new BeIDCardConnector(connection, _context));
        }
        public PcscConnection Connect(string readerName)
        {
            if (string.IsNullOrWhiteSpace(readerName))
            {
                throw new ArgumentNullException(nameof(readerName));
            }

            CheckContextEstablished();
            if (_connection != null && _connection.IsConnect)
            {
                throw new ConnectionException(Constants.ErrorCodes.ConnectionExists);
            }

            _connection = _context.Connect(readerName, SCardShare.Shared, SCardProtocols.T0);
            return(_connection);
        }