private void OnDeviceLost(object sender, AtemDeviceInfo info) { var id = info.Id(); lock (_devices) { if (_devices.TryGetValue(id, out AtemDevice device)) { Log.InfoFormat("Lost device: {0}", info.ToString()); if (!device.Remember) { _devices.Remove(id); _dbDevices.Delete(id); // Ensure its not in the db (it shouldnt be) } // Ensure device is in expected state SetupConnection(device); SendDevicesDebounce(); } } }
public static string Id(this AtemDeviceInfo info) { return(AtemDeviceExt.Id(info.Address, info.Port)); }
public AtemDevice(AtemDeviceInfo info) { Info = info; Subscriptions = new HashSet <string>(); }