using System.Collections.Generic;
using RGB.NET.Core;
namespace RGB.NET.Devices.Razer
{
///
///
///
/// Represents a generic razer-device. (keyboard, mouse, headset, mousepad).
///
public abstract class RazerRGBDevice : AbstractRGBDevice, IRazerRGBDevice
where TDeviceInfo : RazerRGBDeviceInfo
{
#region Constructors
///
/// Initializes a new instance of the class.
///
/// The generic information provided by razer for the device.
protected RazerRGBDevice(TDeviceInfo info, IUpdateQueue updateQueue)
: base(info, updateQueue)
{
RequiresFlush = true;
}
#endregion
#region Methods
///
protected override void UpdateLeds(IEnumerable ledsToUpdate) => UpdateQueue.SetData(GetUpdateData(ledsToUpdate));
///
public override void Dispose()
{
try { UpdateQueue?.Dispose(); }
catch { /* at least we tried */ }
base.Dispose();
}
#endregion
}
}