private void DeviceDepartedHandler(INfcAdapter sender, NfcDeviceEventArgs args) { var device = args.Device; var deviceId = device.Id; lock (lockObject) { Devices.Remove(deviceId); } }
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); } } }