protected override List <IDevice> GetSubDevicesInternal() { List <IDevice> ret = base.GetSubDevicesInternal(); IEnumerable <HidDevice> hidDevices = new HidDeviceLoader().GetDevices(VID_CORSAIR_LINK); foreach (HidDevice hidDevice in hidDevices) { USB.BaseUSBDevice device; switch (hidDevice.ProductID) { case PID_CORSAIR_COMMANDER_LINK_A: device = new DeviceCommanderA(this, hidDevice); break; case PID_CORSAIR_COMMANDER_LINK_B: device = new DeviceCommanderB(this, hidDevice); break; case PID_CORSAIR_BOOTLOADER: device = new DeviceBootloader(this, hidDevice); break; case PID_CORSAIR_MODERN: device = new DeviceModern(this, hidDevice); break; default: device = null; break; } if (device != null) { ret.Add(device); } } return(ret); }
protected override List<IDevice> GetSubDevicesInternal() { List<IDevice> ret = base.GetSubDevicesInternal(); IEnumerable<HidDevice> hidDevices = new HidDeviceLoader().GetDevices(VID_CORSAIR_LINK); foreach (HidDevice hidDevice in hidDevices) { USB.BaseUSBDevice device; switch (hidDevice.ProductID) { case PID_CORSAIR_COMMANDER_LINK_A: device = new DeviceCommanderA(this, hidDevice); break; case PID_CORSAIR_COMMANDER_LINK_B: device = new DeviceCommanderB(this, hidDevice); break; case PID_CORSAIR_BOOTLOADER: device = new DeviceBootloader(this, hidDevice); break; case PID_CORSAIR_MODERN: device = new DeviceModern(this, hidDevice); break; default: device = null; break; } if (device != null) ret.Add(device); } return ret; }