protected NzxtDevice(NzxtDeviceConfig config) { if (config == null) { this.config = new NzxtDeviceConfig(); } else { this.config = config; } }
/// <summary> /// Opens the device asynchronously. If there's a problem opening the device, this returns null /// </summary> public static async Task <SmartDeviceV2> OpenDeviceAsync(NzxtDeviceConfig openConfig = null) { SmartDeviceV2 device = new SmartDeviceV2(openConfig); bool success = await device.OpenHidDevice().ConfigureAwait(false); await device.QueryDevices().ConfigureAwait(false); if (success) { return(device); } else { return(null); } }
protected NzxtDevice() { config = new NzxtDeviceConfig(); }
private SmartDeviceV2(NzxtDeviceConfig config) : base(config) { }