/// <summary> /// Initializes a new instance of the <see cref="LogitechDeviceProvider"/> class. /// </summary> /// <exception cref="InvalidOperationException">Thrown if this constructor is called even if there is already an instance of this class.</exception> public LogitechDeviceProvider() { if (_instance != null) { throw new InvalidOperationException($"There can be only one instance of type {nameof(LogitechDeviceProvider)}"); } _instance = this; }
/// <summary> /// Initializes a new instance of the <see cref="LogitechDeviceProvider"/> class. /// </summary> /// <exception cref="InvalidOperationException">Thrown if this constructor is called even if there is already an instance of this class.</exception> public LogitechDeviceProvider() { if (_instance != null) { throw new InvalidOperationException($"There can be only one instance of type {nameof(LogitechDeviceProvider)}"); } _instance = this; UpdateTrigger = new DeviceUpdateTrigger(); _perDeviceUpdateQueue = new LogitechPerDeviceUpdateQueue(UpdateTrigger); _perKeyUpdateQueue = new LogitechPerKeyUpdateQueue(UpdateTrigger); }