Beispiel #1
0
        private void DeviceDepartedHandler(INfcAdapter sender, NfcDeviceEventArgs args)
        {
            var device   = args.Device;
            var deviceId = device.Id;

            lock (lockObject)
            {
                Devices.Remove(deviceId);
            }
        }
Beispiel #2
0
        private void DeviceArrivedHandler(INfcAdapter sender, NfcDeviceEventArgs args)
        {
            var device   = args.Device;
            var deviceId = device.Id;

            lock (lockObject)
            {
                if (!Devices.ContainsKey(deviceId))
                {
                    Devices[deviceId] = new ProxiedNfcDevice(sender, device);
                }
            }
        }
Beispiel #3
0
 public ProxiedNfcDevice(INfcAdapter adapter, NfcDevice device)
 {
     Device  = device;
     Adapter = adapter;
 }