using RGB.NET.Core; namespace RGB.NET.Devices.Logitech { /// /// /// /// Represents a generic Logitech-device. (keyboard, mouse, headset, mousepad). /// public abstract class LogitechRGBDevice : AbstractRGBDevice, ILogitechRGBDevice where TDeviceInfo : LogitechRGBDeviceInfo { #region Properties & Fields /// /// /// Gets information about the . /// public override TDeviceInfo DeviceInfo { get; } /// /// Gets or sets the update queue performing updates for this device. /// // ReSharper disable once MemberCanBePrivate.Global protected UpdateQueue UpdateQueue { get; set; } #endregion #region Constructors /// /// Initializes a new instance of the class. /// /// The generic information provided by Logitech for the device. protected LogitechRGBDevice(TDeviceInfo info) { this.DeviceInfo = info; } #endregion #region Methods /// /// Initializes the device. /// public virtual void Initialize(UpdateQueue updateQueue) { UpdateQueue = updateQueue; } /// public override void Dispose() { try { UpdateQueue?.Dispose(); } catch { /* at least we tried */ } base.Dispose(); } #endregion } }