public UsbRootHub(string rootHubDevicePath) { var usbDevices = UsbDeviceListFactory.Create(rootHubDevicePath, this); PortNumber = usbDevices.Count; ConnectedDevices = usbDevices.NotOfType(typeof(UnConnectUsbDevice)); }
public UsbHub(IUsbDevice usbDevice) { var childDevices = UsbDeviceListFactory.Create(usbDevice.DevicePath, this); PortNumber = childDevices.Count; ConnectedDevices = childDevices.NotOfType(typeof(UnConnectUsbDevice)); PortNo = usbDevice.PortNo; VendorId = usbDevice.VendorId; ProductId = usbDevice.ProductId; SupportSpeed = usbDevice.SupportSpeed; CurrentUsbDevice = usbDevice.CurrentUsbDevice; DeviceKey = usbDevice.DeviceKey; DevicePath = usbDevice.DevicePath; DeviceDescription = usbDevice.DeviceDescription; SerialNumber = usbDevice.SerialNumber; Parent = usbDevice.Parent; }