1
0
mirror of https://github.com/DarthAffe/RGB.NET.git synced 2025-12-12 17:48:31 +00:00

Sealed a lot of classes that are not meant to be inherited

This commit is contained in:
Darth Affe 2023-04-19 21:19:05 +02:00
parent d9c244a044
commit 2020992249
155 changed files with 205 additions and 344 deletions

View File

@ -11,7 +11,7 @@ namespace RGB.NET.Core;
/// <summary> /// <summary>
/// Represents a ledgroup containing arbitrary <see cref="T:RGB.NET.Core.Led" />. /// Represents a ledgroup containing arbitrary <see cref="T:RGB.NET.Core.Led" />.
/// </summary> /// </summary>
public class ListLedGroup : AbstractLedGroup public sealed class ListLedGroup : AbstractLedGroup
{ {
#region Properties & Fields #region Properties & Fields
@ -20,7 +20,7 @@ public class ListLedGroup : AbstractLedGroup
/// <summary> /// <summary>
/// Gets the list containing the <see cref="Led"/> of this <see cref="ListLedGroup"/>. /// Gets the list containing the <see cref="Led"/> of this <see cref="ListLedGroup"/>.
/// </summary> /// </summary>
protected IList<Led> GroupLeds { get; } = new List<Led>(); private readonly IList<Led> _groupLeds = new List<Led>();
#endregion #endregion
@ -81,10 +81,10 @@ public class ListLedGroup : AbstractLedGroup
/// <param name="leds">The <see cref="Led"/> to add.</param> /// <param name="leds">The <see cref="Led"/> to add.</param>
public void AddLeds(IEnumerable<Led> leds) public void AddLeds(IEnumerable<Led> leds)
{ {
lock (GroupLeds) lock (_groupLeds)
foreach (Led led in leds) foreach (Led led in leds)
if (!ContainsLed(led)) if (!ContainsLed(led))
GroupLeds.Add(led); _groupLeds.Add(led);
} }
/// <summary> /// <summary>
@ -99,9 +99,9 @@ public class ListLedGroup : AbstractLedGroup
/// <param name="leds">The <see cref="Led"/> to remove.</param> /// <param name="leds">The <see cref="Led"/> to remove.</param>
public void RemoveLeds(IEnumerable<Led> leds) public void RemoveLeds(IEnumerable<Led> leds)
{ {
lock (GroupLeds) lock (_groupLeds)
foreach (Led led in leds) foreach (Led led in leds)
GroupLeds.Remove(led); _groupLeds.Remove(led);
} }
/// <summary> /// <summary>
@ -111,8 +111,8 @@ public class ListLedGroup : AbstractLedGroup
/// <returns><c>true</c> if the LED is contained by this ledgroup; otherwise, <c>false</c>.</returns> /// <returns><c>true</c> if the LED is contained by this ledgroup; otherwise, <c>false</c>.</returns>
public bool ContainsLed(Led led) public bool ContainsLed(Led led)
{ {
lock (GroupLeds) lock (_groupLeds)
return GroupLeds.Contains(led); return _groupLeds.Contains(led);
} }
/// <summary> /// <summary>
@ -121,10 +121,10 @@ public class ListLedGroup : AbstractLedGroup
/// <param name="groupToMerge">The ledgroup to merge.</param> /// <param name="groupToMerge">The ledgroup to merge.</param>
public void MergeLeds(ILedGroup groupToMerge) public void MergeLeds(ILedGroup groupToMerge)
{ {
lock (GroupLeds) lock (_groupLeds)
foreach (Led led in groupToMerge) foreach (Led led in groupToMerge)
if (!GroupLeds.Contains(led)) if (!_groupLeds.Contains(led))
GroupLeds.Add(led); _groupLeds.Add(led);
} }
/// <inheritdoc /> /// <inheritdoc />
@ -141,18 +141,18 @@ public class ListLedGroup : AbstractLedGroup
/// <returns>The list containing the <see cref="T:RGB.NET.Core.Led" />.</returns> /// <returns>The list containing the <see cref="T:RGB.NET.Core.Led" />.</returns>
public override IList<Led> ToList() public override IList<Led> ToList()
{ {
lock (GroupLeds) lock (_groupLeds)
return new List<Led>(GroupLeds); return new List<Led>(_groupLeds);
} }
protected override IDisposable ToListUnsafe(out IList<Led> leds) protected override IDisposable ToListUnsafe(out IList<Led> leds)
{ {
Monitor.Enter(GroupLeds); Monitor.Enter(_groupLeds);
leds = GroupLeds; leds = _groupLeds;
return _unlockDisposable; return _unlockDisposable;
} }
private void Unlock() => Monitor.Exit(GroupLeds); private void Unlock() => Monitor.Exit(_groupLeds);
#endregion #endregion
} }

View File

@ -9,7 +9,7 @@ namespace RGB.NET.Core;
/// Represents a single LED of a RGB-device. /// Represents a single LED of a RGB-device.
/// </summary> /// </summary>
[DebuggerDisplay("{Id} {Color}")] [DebuggerDisplay("{Id} {Color}")]
public class Led : Placeable public sealed class Led : Placeable
{ {
#region Properties & Fields #region Properties & Fields

View File

@ -8,7 +8,7 @@ namespace RGB.NET.Core;
/// Represents a mapping from <see cref="LedId"/> to a custom identifier. /// Represents a mapping from <see cref="LedId"/> to a custom identifier.
/// </summary> /// </summary>
/// <typeparam name="T">The identifier the <see cref="LedId"/> is mapped to.</typeparam> /// <typeparam name="T">The identifier the <see cref="LedId"/> is mapped to.</typeparam>
public class LedMapping<T> : IEnumerable<(LedId ledId, T mapping)> public sealed class LedMapping<T> : IEnumerable<(LedId ledId, T mapping)>
where T : notnull where T : notnull
{ {
#region Constants #region Constants

View File

@ -7,7 +7,7 @@ namespace RGB.NET.Core;
/// <summary> /// <summary>
/// Represents a brush drawing only a single color. /// Represents a brush drawing only a single color.
/// </summary> /// </summary>
public class SolidColorBrush : AbstractBrush public sealed class SolidColorBrush : AbstractBrush
{ {
#region Properties & Fields #region Properties & Fields

View File

@ -4,7 +4,7 @@
/// <summary> /// <summary>
/// Represents a brush drawing a texture. /// Represents a brush drawing a texture.
/// </summary> /// </summary>
public class TextureBrush : AbstractBrush public sealed class TextureBrush : AbstractBrush
{ {
#region Properties & Fields #region Properties & Fields

View File

@ -1,6 +1,6 @@
namespace RGB.NET.Core; namespace RGB.NET.Core;
internal class EmptyTexture : ITexture internal sealed class EmptyTexture : ITexture
{ {
#region Properties & Fields #region Properties & Fields

View File

@ -48,7 +48,7 @@ public interface ICustomUpdateData
/// <summary> /// <summary>
/// Represents a set of custom data, each indexed by a string-key. /// Represents a set of custom data, each indexed by a string-key.
/// </summary> /// </summary>
public class CustomUpdateData : ICustomUpdateData public sealed class CustomUpdateData : ICustomUpdateData
{ {
#region Properties & Fields #region Properties & Fields
@ -92,7 +92,7 @@ public class CustomUpdateData : ICustomUpdateData
#endregion #endregion
} }
internal class DefaultCustomUpdateData : ICustomUpdateData internal sealed class DefaultCustomUpdateData : ICustomUpdateData
{ {
#region Constants #region Constants
@ -120,7 +120,7 @@ internal class DefaultCustomUpdateData : ICustomUpdateData
#region Constructors #region Constructors
public DefaultCustomUpdateData(bool flushLeds) private DefaultCustomUpdateData(bool flushLeds)
{ {
this._flushLeds = flushLeds; this._flushLeds = flushLeds;
} }

View File

@ -10,7 +10,7 @@ namespace RGB.NET.Core;
/// <summary> /// <summary>
/// Represents an update trigger that triggers in a set interval. /// Represents an update trigger that triggers in a set interval.
/// </summary> /// </summary>
public class TimerUpdateTrigger : AbstractUpdateTrigger public sealed class TimerUpdateTrigger : AbstractUpdateTrigger
{ {
#region Properties & Fields #region Properties & Fields
@ -21,17 +21,17 @@ public class TimerUpdateTrigger : AbstractUpdateTrigger
/// <summary> /// <summary>
/// Gets or sets the update loop of this trigger. /// Gets or sets the update loop of this trigger.
/// </summary> /// </summary>
protected Task? UpdateTask { get; set; } private Task? _updateTask;
/// <summary> /// <summary>
/// Gets or sets the cancellation token source used to create the cancellation token checked by the <see cref="UpdateTask"/>. /// Gets or sets the cancellation token source used to create the cancellation token checked by the <see cref="_updateTask"/>.
/// </summary> /// </summary>
protected CancellationTokenSource? UpdateTokenSource { get; set; } private CancellationTokenSource? _updateTokenSource;
/// <summary> /// <summary>
/// Gets or sets the cancellation token checked by the <see cref="UpdateTask"/>. /// Gets or sets the cancellation token checked by the <see cref="_updateTask"/>.
/// </summary> /// </summary>
protected CancellationToken UpdateToken { get; set; } private CancellationToken _updateToken;
private double _updateFrequency = 1.0 / 30.0; private double _updateFrequency = 1.0 / 30.0;
/// <summary> /// <summary>
@ -88,11 +88,11 @@ public class TimerUpdateTrigger : AbstractUpdateTrigger
{ {
lock (_lock) lock (_lock)
{ {
if (UpdateTask == null) if (_updateTask == null)
{ {
UpdateTokenSource?.Dispose(); _updateTokenSource?.Dispose();
UpdateTokenSource = new CancellationTokenSource(); _updateTokenSource = new CancellationTokenSource();
UpdateTask = Task.Factory.StartNew(UpdateLoop, (UpdateToken = UpdateTokenSource.Token), TaskCreationOptions.LongRunning, TaskScheduler.Default); _updateTask = Task.Factory.StartNew(UpdateLoop, (_updateToken = _updateTokenSource.Token), TaskCreationOptions.LongRunning, TaskScheduler.Default);
} }
} }
} }
@ -104,13 +104,13 @@ public class TimerUpdateTrigger : AbstractUpdateTrigger
{ {
lock (_lock) lock (_lock)
{ {
if (UpdateTask != null) if (_updateTask != null)
{ {
UpdateTokenSource?.Cancel(); _updateTokenSource?.Cancel();
try try
{ {
// ReSharper disable once MethodSupportsCancellation // ReSharper disable once MethodSupportsCancellation
UpdateTask.Wait(); _updateTask.Wait();
} }
catch (AggregateException) catch (AggregateException)
{ {
@ -118,8 +118,8 @@ public class TimerUpdateTrigger : AbstractUpdateTrigger
} }
finally finally
{ {
UpdateTask.Dispose(); _updateTask.Dispose();
UpdateTask = null; _updateTask = null;
} }
} }
} }
@ -130,7 +130,7 @@ public class TimerUpdateTrigger : AbstractUpdateTrigger
OnStartup(); OnStartup();
using (TimerHelper.RequestHighResolutionTimer()) using (TimerHelper.RequestHighResolutionTimer())
while (!UpdateToken.IsCancellationRequested) while (!_updateToken.IsCancellationRequested)
LastUpdateTime = TimerHelper.Execute(TimerExecute, UpdateFrequency * 1000); LastUpdateTime = TimerHelper.Execute(TimerExecute, UpdateFrequency * 1000);
} }
@ -140,7 +140,6 @@ public class TimerUpdateTrigger : AbstractUpdateTrigger
public override void Dispose() public override void Dispose()
{ {
Stop(); Stop();
GC.SuppressFinalize(this);
} }
#endregion #endregion

View File

@ -12,7 +12,7 @@ namespace RGB.NET.Devices.Asus;
/// <summary> /// <summary>
/// Represents a device provider responsible for Cooler Master devices. /// Represents a device provider responsible for Cooler Master devices.
/// </summary> /// </summary>
public class AsusDeviceProvider : AbstractRGBDeviceProvider public sealed class AsusDeviceProvider : AbstractRGBDeviceProvider
{ {
#region Properties & Fields #region Properties & Fields
@ -88,8 +88,6 @@ public class AsusDeviceProvider : AbstractRGBDeviceProvider
_devices = null; _devices = null;
_sdk = null; _sdk = null;
GC.SuppressFinalize(this);
} }
#endregion #endregion

View File

@ -6,7 +6,7 @@ namespace RGB.NET.Devices.Asus;
/// <summary> /// <summary>
/// Represents a Asus headset. /// Represents a Asus headset.
/// </summary> /// </summary>
public class AsusUnspecifiedRGBDevice : AsusRGBDevice<AsusRGBDeviceInfo>, IUnknownDevice public sealed class AsusUnspecifiedRGBDevice : AsusRGBDevice<AsusRGBDeviceInfo>, IUnknownDevice
{ {
#region Properties & Fields #region Properties & Fields

View File

@ -8,7 +8,7 @@ namespace RGB.NET.Devices.Asus;
/// <summary> /// <summary>
/// Represents the update-queue performing updates for asus devices. /// Represents the update-queue performing updates for asus devices.
/// </summary> /// </summary>
public class AsusUpdateQueue : UpdateQueue public sealed class AsusUpdateQueue : UpdateQueue
{ {
#region Properties & Fields #region Properties & Fields
@ -17,7 +17,7 @@ public class AsusUpdateQueue : UpdateQueue
/// <summary> /// <summary>
/// The device to be updated. /// The device to be updated.
/// </summary> /// </summary>
protected IAuraSyncDevice Device { get; } private readonly IAuraSyncDevice _device;
#endregion #endregion
@ -31,7 +31,7 @@ public class AsusUpdateQueue : UpdateQueue
public AsusUpdateQueue(IDeviceUpdateTrigger updateTrigger, IAuraSyncDevice device) public AsusUpdateQueue(IDeviceUpdateTrigger updateTrigger, IAuraSyncDevice device)
: base(updateTrigger) : base(updateTrigger)
{ {
this.Device = device; this._device = device;
this._lights = new IAuraRgbLight[device.Lights.Count]; this._lights = new IAuraRgbLight[device.Lights.Count];
for (int i = 0; i < device.Lights.Count; i++) for (int i = 0; i < device.Lights.Count; i++)
@ -47,9 +47,9 @@ public class AsusUpdateQueue : UpdateQueue
{ {
try try
{ {
if ((Device.Type == (uint)AsusDeviceType.KEYBOARD_RGB) || (Device.Type == (uint)AsusDeviceType.NB_KB_RGB)) if ((_device.Type == (uint)AsusDeviceType.KEYBOARD_RGB) || (_device.Type == (uint)AsusDeviceType.NB_KB_RGB))
{ {
if (Device is not IAuraSyncKeyboard keyboard) if (_device is not IAuraSyncKeyboard keyboard)
return true; return true;
foreach ((object customData, Color value) in dataSet) foreach ((object customData, Color value) in dataSet)
@ -87,7 +87,7 @@ public class AsusUpdateQueue : UpdateQueue
} }
} }
Device.Apply(); _device.Apply();
return true; return true;
} }

View File

@ -6,7 +6,7 @@ namespace RGB.NET.Devices.Asus;
/// <summary> /// <summary>
/// Represents a Asus graphicsCard. /// Represents a Asus graphicsCard.
/// </summary> /// </summary>
public class AsusGraphicsCardRGBDevice : AsusRGBDevice<AsusRGBDeviceInfo>, IGraphicsCard public sealed class AsusGraphicsCardRGBDevice : AsusRGBDevice<AsusRGBDeviceInfo>, IGraphicsCard
{ {
#region Constructors #region Constructors

View File

@ -6,7 +6,7 @@ namespace RGB.NET.Devices.Asus;
/// <summary> /// <summary>
/// Represents a Asus headset. /// Represents a Asus headset.
/// </summary> /// </summary>
public class AsusHeadsetRGBDevice : AsusRGBDevice<AsusRGBDeviceInfo>, IHeadset public sealed class AsusHeadsetRGBDevice : AsusRGBDevice<AsusRGBDeviceInfo>, IHeadset
{ {
#region Constructors #region Constructors

View File

@ -20,7 +20,7 @@ public record AsusKeyboardExtraMapping(Regex Regex, LedMapping<int> LedMapping);
/// <summary> /// <summary>
/// Represents a Asus keyboard. /// Represents a Asus keyboard.
/// </summary> /// </summary>
public class AsusKeyboardRGBDevice : AsusRGBDevice<AsusKeyboardRGBDeviceInfo>, IKeyboard public sealed class AsusKeyboardRGBDevice : AsusRGBDevice<AsusKeyboardRGBDeviceInfo>, IKeyboard
{ {
#region Properties & Fields #region Properties & Fields

View File

@ -7,7 +7,7 @@ namespace RGB.NET.Devices.Asus;
/// <summary> /// <summary>
/// Represents a generic information for a <see cref="T:RGB.NET.Devices.Asus.AsusKeyboardRGBDevice" />. /// Represents a generic information for a <see cref="T:RGB.NET.Devices.Asus.AsusKeyboardRGBDevice" />.
/// </summary> /// </summary>
public class AsusKeyboardRGBDeviceInfo : AsusRGBDeviceInfo, IKeyboardDeviceInfo public sealed class AsusKeyboardRGBDeviceInfo : AsusRGBDeviceInfo, IKeyboardDeviceInfo
{ {
#region Properties & Fields #region Properties & Fields

View File

@ -6,7 +6,7 @@ namespace RGB.NET.Devices.Asus;
/// <summary> /// <summary>
/// Represents a Asus mainboard. /// Represents a Asus mainboard.
/// </summary> /// </summary>
public class AsusMainboardRGBDevice : AsusRGBDevice<AsusRGBDeviceInfo>, IMainboard public sealed class AsusMainboardRGBDevice : AsusRGBDevice<AsusRGBDeviceInfo>, IMainboard
{ {
#region Constructors #region Constructors

View File

@ -6,7 +6,7 @@ namespace RGB.NET.Devices.Asus;
/// <summary> /// <summary>
/// Represents a Asus mouse. /// Represents a Asus mouse.
/// </summary> /// </summary>
public class AsusMouseRGBDevice : AsusRGBDevice<AsusRGBDeviceInfo>, IMouse public sealed class AsusMouseRGBDevice : AsusRGBDevice<AsusRGBDeviceInfo>, IMouse
{ {
#region Constructors #region Constructors

View File

@ -8,7 +8,7 @@ namespace RGB.NET.Devices.CoolerMaster;
/// Specifies the <see cref="T:RGB.NET.Core.RGBDeviceType" /> of a field. /// Specifies the <see cref="T:RGB.NET.Core.RGBDeviceType" /> of a field.
/// </summary> /// </summary>
[AttributeUsage(AttributeTargets.Field)] [AttributeUsage(AttributeTargets.Field)]
public class DeviceTypeAttribute : Attribute public sealed class DeviceTypeAttribute : Attribute
{ {
#region Properties & Fields #region Properties & Fields

View File

@ -13,7 +13,7 @@ namespace RGB.NET.Devices.CoolerMaster;
/// <summary> /// <summary>
/// Represents a device provider responsible for Cooler Master devices. /// Represents a device provider responsible for Cooler Master devices.
/// </summary> /// </summary>
public class CoolerMasterDeviceProvider : AbstractRGBDeviceProvider public sealed class CoolerMasterDeviceProvider : AbstractRGBDeviceProvider
{ {
#region Properties & Fields #region Properties & Fields
@ -100,8 +100,6 @@ public class CoolerMasterDeviceProvider : AbstractRGBDeviceProvider
try { _CoolerMasterSDK.Reload(); } try { _CoolerMasterSDK.Reload(); }
catch { /* Unlucky.. */ } catch { /* Unlucky.. */ }
GC.SuppressFinalize(this);
} }
#endregion #endregion

View File

@ -4,8 +4,6 @@
using System.ComponentModel; using System.ComponentModel;
using RGB.NET.Core; using RGB.NET.Core;
#pragma warning disable 1591 // Missing XML comment for publicly visible type or member
namespace RGB.NET.Devices.CoolerMaster; namespace RGB.NET.Devices.CoolerMaster;
/// <summary> /// <summary>

View File

@ -1,40 +0,0 @@
// ReSharper disable InconsistentNaming
// ReSharper disable UnusedMember.Global
#pragma warning disable 1591 // Missing XML comment for publicly visible type or member
namespace RGB.NET.Devices.CoolerMaster;
/// <summary>
/// Contains a list of available effects.
/// </summary>
public enum CoolerMasterEffects
{
FullOn = 0,
Breath = 1,
BreathCycle = 2,
Single = 3,
Wave = 4,
Ripple = 5,
Cross = 6,
Rain = 7,
Star = 8,
Snake = 9,
Rec = 10,
Spectrum = 11,
RapidFire = 12,
Indicator = 13, //mouse Effect
FireBall = 14,
WaterRipple = 15,
ReactivePunch = 16,
Snowing = 17,
HeartBeat = 18,
ReactiveTornade = 19,
Multi1 = 0xE0,
Multi2 = 0xE1,
Multi3 = 0xE2,
Multi4 = 0xE3,
Off = 0xFE
}

View File

@ -8,7 +8,7 @@ namespace RGB.NET.Devices.CoolerMaster;
/// <summary> /// <summary>
/// Represents the update-queue performing updates for cooler master devices. /// Represents the update-queue performing updates for cooler master devices.
/// </summary> /// </summary>
public class CoolerMasterUpdateQueue : UpdateQueue public sealed class CoolerMasterUpdateQueue : UpdateQueue
{ {
#region Properties & Fields #region Properties & Fields

View File

@ -7,7 +7,7 @@ namespace RGB.NET.Devices.CoolerMaster;
/// <summary> /// <summary>
/// Represents a CoolerMaster keyboard. /// Represents a CoolerMaster keyboard.
/// </summary> /// </summary>
public class CoolerMasterKeyboardRGBDevice : CoolerMasterRGBDevice<CoolerMasterKeyboardRGBDeviceInfo>, IKeyboard public sealed class CoolerMasterKeyboardRGBDevice : CoolerMasterRGBDevice<CoolerMasterKeyboardRGBDeviceInfo>, IKeyboard
{ {
#region Properties & Fields #region Properties & Fields

View File

@ -5,7 +5,7 @@ namespace RGB.NET.Devices.CoolerMaster;
/// <summary> /// <summary>
/// Represents a generic information for a <see cref="T:RGB.NET.Devices.CoolerMaster.CoolerMasterKeyboardRGBDevice" />. /// Represents a generic information for a <see cref="T:RGB.NET.Devices.CoolerMaster.CoolerMasterKeyboardRGBDevice" />.
/// </summary> /// </summary>
public class CoolerMasterKeyboardRGBDeviceInfo : CoolerMasterRGBDeviceInfo, IKeyboardDeviceInfo public sealed class CoolerMasterKeyboardRGBDeviceInfo : CoolerMasterRGBDeviceInfo, IKeyboardDeviceInfo
{ {
#region Properties & Fields #region Properties & Fields

View File

@ -7,7 +7,7 @@ namespace RGB.NET.Devices.CoolerMaster;
/// <summary> /// <summary>
/// Represents a CoolerMaster mouse. /// Represents a CoolerMaster mouse.
/// </summary> /// </summary>
public class CoolerMasterMouseRGBDevice : CoolerMasterRGBDevice<CoolerMasterMouseRGBDeviceInfo>, IMouse public sealed class CoolerMasterMouseRGBDevice : CoolerMasterRGBDevice<CoolerMasterMouseRGBDeviceInfo>, IMouse
{ {
#region Constructors #region Constructors

View File

@ -6,7 +6,7 @@ namespace RGB.NET.Devices.CoolerMaster;
/// <summary> /// <summary>
/// Represents a generic information for a <see cref="T:RGB.NET.Devices.CoolerMaster.CoolerMasterMouseRGBDevice" />. /// Represents a generic information for a <see cref="T:RGB.NET.Devices.CoolerMaster.CoolerMasterMouseRGBDevice" />.
/// </summary> /// </summary>
public class CoolerMasterMouseRGBDeviceInfo : CoolerMasterRGBDeviceInfo public sealed class CoolerMasterMouseRGBDeviceInfo : CoolerMasterRGBDeviceInfo
{ {
#region Constructors #region Constructors

View File

@ -10,7 +10,7 @@ namespace RGB.NET.Devices.Corsair;
/// <summary> /// <summary>
/// Represents a corsair cooler. /// Represents a corsair cooler.
/// </summary> /// </summary>
public class CorsairCoolerRGBDevice : CorsairRGBDevice<CorsairCoolerRGBDeviceInfo>, ICooler public sealed class CorsairCoolerRGBDevice : CorsairRGBDevice<CorsairCoolerRGBDeviceInfo>, ICooler
{ {
#region Constructors #region Constructors

View File

@ -10,7 +10,7 @@ namespace RGB.NET.Devices.Corsair;
/// <summary> /// <summary>
/// Represents a generic information for a <see cref="T:RGB.NET.Devices.Corsair.CorsairCoolerRGBDevice" />. /// Represents a generic information for a <see cref="T:RGB.NET.Devices.Corsair.CorsairCoolerRGBDevice" />.
/// </summary> /// </summary>
public class CorsairCoolerRGBDeviceInfo : CorsairRGBDeviceInfo public sealed class CorsairCoolerRGBDeviceInfo : CorsairRGBDeviceInfo
{ {
#region Constructors #region Constructors

View File

@ -13,7 +13,7 @@ namespace RGB.NET.Devices.Corsair;
/// <summary> /// <summary>
/// Represents a device provider responsible for corsair (CUE) devices. /// Represents a device provider responsible for corsair (CUE) devices.
/// </summary> /// </summary>
public class CorsairDeviceProvider : AbstractRGBDeviceProvider public sealed class CorsairDeviceProvider : AbstractRGBDeviceProvider
{ {
#region Properties & Fields #region Properties & Fields
@ -306,8 +306,6 @@ public class CorsairDeviceProvider : AbstractRGBDeviceProvider
try { _CUESDK.CorsairDisconnect(); } catch { /* at least we tried */ } try { _CUESDK.CorsairDisconnect(); } catch { /* at least we tried */ }
try { _CUESDK.UnloadCUESDK(); } catch { /* at least we tried */ } try { _CUESDK.UnloadCUESDK(); } catch { /* at least we tried */ }
GC.SuppressFinalize(this);
} }
#endregion #endregion

View File

@ -9,7 +9,7 @@ namespace RGB.NET.Devices.Corsair;
/// <summary> /// <summary>
/// Represents an exception thrown by the CUE. /// Represents an exception thrown by the CUE.
/// </summary> /// </summary>
public class CUEException : ApplicationException public sealed class CUEException : ApplicationException
{ {
#region Properties & Fields #region Properties & Fields

View File

@ -10,7 +10,7 @@ namespace RGB.NET.Devices.Corsair;
/// <summary> /// <summary>
/// Represents a corsair fan. /// Represents a corsair fan.
/// </summary> /// </summary>
public class CorsairFanRGBDevice : CorsairRGBDevice<CorsairFanRGBDeviceInfo>, IFan public sealed class CorsairFanRGBDevice : CorsairRGBDevice<CorsairFanRGBDeviceInfo>, IFan
{ {
#region Constructors #region Constructors

View File

@ -10,7 +10,7 @@ namespace RGB.NET.Devices.Corsair;
/// <summary> /// <summary>
/// Represents a generic information for a <see cref="T:RGB.NET.Devices.Corsair.CorsairFanRGBDevice" />. /// Represents a generic information for a <see cref="T:RGB.NET.Devices.Corsair.CorsairFanRGBDevice" />.
/// </summary> /// </summary>
public class CorsairFanRGBDeviceInfo : CorsairRGBDeviceInfo public sealed class CorsairFanRGBDeviceInfo : CorsairRGBDeviceInfo
{ {
#region Constructors #region Constructors

View File

@ -9,7 +9,7 @@ namespace RGB.NET.Devices.Corsair;
/// <summary> /// <summary>
/// Represents the update-queue performing updates for corsair devices. /// Represents the update-queue performing updates for corsair devices.
/// </summary> /// </summary>
public class CorsairDeviceUpdateQueue : UpdateQueue public sealed class CorsairDeviceUpdateQueue : UpdateQueue
{ {
#region Properties & Fields #region Properties & Fields
@ -76,8 +76,6 @@ public class CorsairDeviceUpdateQueue : UpdateQueue
_isDisposed = true; _isDisposed = true;
Marshal.FreeHGlobal(_colorPtr); Marshal.FreeHGlobal(_colorPtr);
GC.SuppressFinalize(this);
} }
#endregion #endregion

View File

@ -7,7 +7,7 @@ namespace RGB.NET.Devices.Corsair;
/// <summary> /// <summary>
/// Represents version information for the Corsair-SDK /// Represents version information for the Corsair-SDK
/// </summary> /// </summary>
public class CorsairSessionDetails public sealed class CorsairSessionDetails
{ {
#region Properties & Fields #region Properties & Fields

View File

@ -10,7 +10,7 @@ namespace RGB.NET.Devices.Corsair;
/// <summary> /// <summary>
/// Represents a corsair graphics card. /// Represents a corsair graphics card.
/// </summary> /// </summary>
public class CorsairGraphicsCardRGBDevice : CorsairRGBDevice<CorsairGraphicsCardRGBDeviceInfo>, IGraphicsCard public sealed class CorsairGraphicsCardRGBDevice : CorsairRGBDevice<CorsairGraphicsCardRGBDeviceInfo>, IGraphicsCard
{ {
#region Constructors #region Constructors

View File

@ -10,7 +10,7 @@ namespace RGB.NET.Devices.Corsair;
/// <summary> /// <summary>
/// Represents a generic information for a <see cref="T:RGB.NET.Devices.Corsair.CorsairGraphicsCardRGBDevice" />. /// Represents a generic information for a <see cref="T:RGB.NET.Devices.Corsair.CorsairGraphicsCardRGBDevice" />.
/// </summary> /// </summary>
public class CorsairGraphicsCardRGBDeviceInfo : CorsairRGBDeviceInfo public sealed class CorsairGraphicsCardRGBDeviceInfo : CorsairRGBDeviceInfo
{ {
#region Constructors #region Constructors

View File

@ -10,7 +10,7 @@ namespace RGB.NET.Devices.Corsair;
/// <summary> /// <summary>
/// Represents a corsair headset. /// Represents a corsair headset.
/// </summary> /// </summary>
public class CorsairHeadsetRGBDevice : CorsairRGBDevice<CorsairHeadsetRGBDeviceInfo>, IHeadset public sealed class CorsairHeadsetRGBDevice : CorsairRGBDevice<CorsairHeadsetRGBDeviceInfo>, IHeadset
{ {
#region Constructors #region Constructors

View File

@ -7,7 +7,7 @@ namespace RGB.NET.Devices.Corsair;
/// <summary> /// <summary>
/// Represents a generic information for a <see cref="T:RGB.NET.Devices.Corsair.CorsairHeadsetRGBDevice" />. /// Represents a generic information for a <see cref="T:RGB.NET.Devices.Corsair.CorsairHeadsetRGBDevice" />.
/// </summary> /// </summary>
public class CorsairHeadsetRGBDeviceInfo : CorsairRGBDeviceInfo public sealed class CorsairHeadsetRGBDeviceInfo : CorsairRGBDeviceInfo
{ {
#region Constructors #region Constructors

View File

@ -10,7 +10,7 @@ namespace RGB.NET.Devices.Corsair;
/// <summary> /// <summary>
/// Represents a corsair headset stand. /// Represents a corsair headset stand.
/// </summary> /// </summary>
public class CorsairHeadsetStandRGBDevice : CorsairRGBDevice<CorsairHeadsetStandRGBDeviceInfo>, IHeadsetStand public sealed class CorsairHeadsetStandRGBDevice : CorsairRGBDevice<CorsairHeadsetStandRGBDeviceInfo>, IHeadsetStand
{ {
#region Constructors #region Constructors

View File

@ -7,7 +7,7 @@ namespace RGB.NET.Devices.Corsair;
/// <summary> /// <summary>
/// Represents a generic information for a <see cref="T:RGB.NET.Devices.Corsair.CorsairHeadsetStandRGBDevice" />. /// Represents a generic information for a <see cref="T:RGB.NET.Devices.Corsair.CorsairHeadsetStandRGBDevice" />.
/// </summary> /// </summary>
public class CorsairHeadsetStandRGBDeviceInfo : CorsairRGBDeviceInfo public sealed class CorsairHeadsetStandRGBDeviceInfo : CorsairRGBDeviceInfo
{ {
#region Constructors #region Constructors

View File

@ -10,7 +10,7 @@ namespace RGB.NET.Devices.Corsair;
/// <summary> /// <summary>
/// Represents a corsair keyboard. /// Represents a corsair keyboard.
/// </summary> /// </summary>
public class CorsairKeyboardRGBDevice : CorsairRGBDevice<CorsairKeyboardRGBDeviceInfo>, IKeyboard public sealed class CorsairKeyboardRGBDevice : CorsairRGBDevice<CorsairKeyboardRGBDeviceInfo>, IKeyboard
{ {
#region Properties & Fields #region Properties & Fields

View File

@ -9,7 +9,7 @@ namespace RGB.NET.Devices.Corsair;
/// <summary> /// <summary>
/// Represents a generic information for a <see cref="T:RGB.NET.Devices.Corsair.CorsairKeyboardRGBDevice" />. /// Represents a generic information for a <see cref="T:RGB.NET.Devices.Corsair.CorsairKeyboardRGBDevice" />.
/// </summary> /// </summary>
public class CorsairKeyboardRGBDeviceInfo : CorsairRGBDeviceInfo, IKeyboardDeviceInfo public sealed class CorsairKeyboardRGBDeviceInfo : CorsairRGBDeviceInfo, IKeyboardDeviceInfo
{ {
#region Properties & Fields #region Properties & Fields

View File

@ -10,7 +10,7 @@ namespace RGB.NET.Devices.Corsair;
/// <summary> /// <summary>
/// Represents a corsair ledStrip. /// Represents a corsair ledStrip.
/// </summary> /// </summary>
public class CorsairLedStripRGBDevice : CorsairRGBDevice<CorsairLedStripRGBDeviceInfo>, ILedStripe public sealed class CorsairLedStripRGBDevice : CorsairRGBDevice<CorsairLedStripRGBDeviceInfo>, ILedStripe
{ {
#region Constructors #region Constructors

View File

@ -10,7 +10,7 @@ namespace RGB.NET.Devices.Corsair;
/// <summary> /// <summary>
/// Represents a generic information for a <see cref="T:RGB.NET.Devices.Corsair.CorsairLedStripRGBDevice" />. /// Represents a generic information for a <see cref="T:RGB.NET.Devices.Corsair.CorsairLedStripRGBDevice" />.
/// </summary> /// </summary>
public class CorsairLedStripRGBDeviceInfo : CorsairRGBDeviceInfo public sealed class CorsairLedStripRGBDeviceInfo : CorsairRGBDeviceInfo
{ {
#region Constructors #region Constructors

View File

@ -10,7 +10,7 @@ namespace RGB.NET.Devices.Corsair;
/// <summary> /// <summary>
/// Represents a corsair memory. /// Represents a corsair memory.
/// </summary> /// </summary>
public class CorsairMainboardRGBDevice : CorsairRGBDevice<CorsairMainboardRGBDeviceInfo>, IMainboard public sealed class CorsairMainboardRGBDevice : CorsairRGBDevice<CorsairMainboardRGBDeviceInfo>, IMainboard
{ {
#region Constructors #region Constructors

View File

@ -10,7 +10,7 @@ namespace RGB.NET.Devices.Corsair;
/// <summary> /// <summary>
/// Represents a generic information for a <see cref="T:RGB.NET.Devices.Corsair.CorsairMainboardRGBDevice" />. /// Represents a generic information for a <see cref="T:RGB.NET.Devices.Corsair.CorsairMainboardRGBDevice" />.
/// </summary> /// </summary>
public class CorsairMainboardRGBDeviceInfo : CorsairRGBDeviceInfo public sealed class CorsairMainboardRGBDeviceInfo : CorsairRGBDeviceInfo
{ {
#region Constructors #region Constructors

View File

@ -10,7 +10,7 @@ namespace RGB.NET.Devices.Corsair;
/// <summary> /// <summary>
/// Represents a corsair memory. /// Represents a corsair memory.
/// </summary> /// </summary>
public class CorsairMemoryRGBDevice : CorsairRGBDevice<CorsairMemoryRGBDeviceInfo>, IDRAM public sealed class CorsairMemoryRGBDevice : CorsairRGBDevice<CorsairMemoryRGBDeviceInfo>, IDRAM
{ {
#region Constructors #region Constructors

View File

@ -10,7 +10,7 @@ namespace RGB.NET.Devices.Corsair;
/// <summary> /// <summary>
/// Represents a generic information for a <see cref="T:RGB.NET.Devices.Corsair.CorsairMemoryRGBDevice" />. /// Represents a generic information for a <see cref="T:RGB.NET.Devices.Corsair.CorsairMemoryRGBDevice" />.
/// </summary> /// </summary>
public class CorsairMemoryRGBDeviceInfo : CorsairRGBDeviceInfo public sealed class CorsairMemoryRGBDeviceInfo : CorsairRGBDeviceInfo
{ {
#region Constructors #region Constructors

View File

@ -10,7 +10,7 @@ namespace RGB.NET.Devices.Corsair;
/// <summary> /// <summary>
/// Represents a corsair mouse. /// Represents a corsair mouse.
/// </summary> /// </summary>
public class CorsairMouseRGBDevice : CorsairRGBDevice<CorsairMouseRGBDeviceInfo>, IMouse public sealed class CorsairMouseRGBDevice : CorsairRGBDevice<CorsairMouseRGBDeviceInfo>, IMouse
{ {
#region Constructors #region Constructors

View File

@ -7,7 +7,7 @@ namespace RGB.NET.Devices.Corsair;
/// <summary> /// <summary>
/// Represents a generic information for a <see cref="T:RGB.NET.Devices.Corsair.CorsairMouseRGBDevice" />. /// Represents a generic information for a <see cref="T:RGB.NET.Devices.Corsair.CorsairMouseRGBDevice" />.
/// </summary> /// </summary>
public class CorsairMouseRGBDeviceInfo : CorsairRGBDeviceInfo public sealed class CorsairMouseRGBDeviceInfo : CorsairRGBDeviceInfo
{ {
#region Constructors #region Constructors

View File

@ -10,7 +10,7 @@ namespace RGB.NET.Devices.Corsair;
/// <summary> /// <summary>
/// Represents a corsair mousepad. /// Represents a corsair mousepad.
/// </summary> /// </summary>
public class CorsairMousepadRGBDevice : CorsairRGBDevice<CorsairMousepadRGBDeviceInfo>, IMousepad public sealed class CorsairMousepadRGBDevice : CorsairRGBDevice<CorsairMousepadRGBDeviceInfo>, IMousepad
{ {
#region Constructors #region Constructors

View File

@ -7,7 +7,7 @@ namespace RGB.NET.Devices.Corsair;
/// <summary> /// <summary>
/// Represents a generic information for a <see cref="T:RGB.NET.Devices.Corsair.CorsairMousepadRGBDevice" />. /// Represents a generic information for a <see cref="T:RGB.NET.Devices.Corsair.CorsairMousepadRGBDevice" />.
/// </summary> /// </summary>
public class CorsairMousepadRGBDeviceInfo : CorsairRGBDeviceInfo public sealed class CorsairMousepadRGBDeviceInfo : CorsairRGBDeviceInfo
{ {
#region Constructors #region Constructors

View File

@ -12,7 +12,7 @@ namespace RGB.NET.Devices.Corsair.Native;
/// iCUE-SDK: contains device search filter /// iCUE-SDK: contains device search filter
/// </summary> /// </summary>
[StructLayout(LayoutKind.Sequential)] [StructLayout(LayoutKind.Sequential)]
internal class _CorsairDeviceFilter internal sealed class _CorsairDeviceFilter
{ {
#region Properties & Fields #region Properties & Fields

View File

@ -12,7 +12,7 @@ namespace RGB.NET.Devices.Corsair.Native;
/// iCUE-SDK: contains information about device /// iCUE-SDK: contains information about device
/// </summary> /// </summary>
[StructLayout(LayoutKind.Sequential)] [StructLayout(LayoutKind.Sequential)]
internal class _CorsairDeviceInfo internal sealed class _CorsairDeviceInfo
{ {
/// <summary> /// <summary>
/// iCUE-SDK: enum describing device type /// iCUE-SDK: enum describing device type

View File

@ -13,7 +13,7 @@ namespace RGB.NET.Devices.Corsair.Native;
/// iCUE-SDK: contains led id and position of led /// iCUE-SDK: contains led id and position of led
/// </summary> /// </summary>
[StructLayout(LayoutKind.Sequential)] [StructLayout(LayoutKind.Sequential)]
internal class _CorsairLedPosition internal sealed class _CorsairLedPosition
{ {
/// <summary> /// <summary>
/// iCUE-SDK: unique identifier of led /// iCUE-SDK: unique identifier of led

View File

@ -13,7 +13,7 @@ namespace RGB.NET.Devices.Corsair.Native;
/// iCUE-SDK: contains information about SDK and iCUE versions /// iCUE-SDK: contains information about SDK and iCUE versions
/// </summary> /// </summary>
[StructLayout(LayoutKind.Sequential)] [StructLayout(LayoutKind.Sequential)]
internal class _CorsairSessionDetails internal sealed class _CorsairSessionDetails
{ {
/// <summary> /// <summary>
/// iCUE-SDK: version of SDK client (like {4,0,1}). Always contains valid value even if there was no iCUE found. Must comply with the semantic versioning rules. /// iCUE-SDK: version of SDK client (like {4,0,1}). Always contains valid value even if there was no iCUE found. Must comply with the semantic versioning rules.

View File

@ -13,7 +13,7 @@ namespace RGB.NET.Devices.Corsair.Native;
/// iCUE-SDK: contains information about session state and client/server versions /// iCUE-SDK: contains information about session state and client/server versions
/// </summary> /// </summary>
[StructLayout(LayoutKind.Sequential)] [StructLayout(LayoutKind.Sequential)]
internal class _CorsairSessionStateChanged internal sealed class _CorsairSessionStateChanged
{ {
/// <summary> /// <summary>
/// iCUE-SDK: new session state which SDK client has been transitioned to /// iCUE-SDK: new session state which SDK client has been transitioned to

View File

@ -13,7 +13,7 @@ namespace RGB.NET.Devices.Corsair.Native;
/// iCUE-SDK: contains information about version that consists of three components /// iCUE-SDK: contains information about version that consists of three components
/// </summary> /// </summary>
[StructLayout(LayoutKind.Sequential)] [StructLayout(LayoutKind.Sequential)]
internal class _CorsairVersion internal sealed class _CorsairVersion
{ {
#region Properties & Fields #region Properties & Fields

View File

@ -10,7 +10,7 @@ namespace RGB.NET.Devices.Corsair;
/// <summary> /// <summary>
/// Represents a corsair touchbar. /// Represents a corsair touchbar.
/// </summary> /// </summary>
public class CorsairTouchbarRGBDevice : CorsairRGBDevice<CorsairTouchbarRGBDeviceInfo>, ILedStripe public sealed class CorsairTouchbarRGBDevice : CorsairRGBDevice<CorsairTouchbarRGBDeviceInfo>, ILedStripe
{ {
#region Constructors #region Constructors

View File

@ -10,7 +10,7 @@ namespace RGB.NET.Devices.Corsair;
/// <summary> /// <summary>
/// Represents a generic information for a <see cref="T:RGB.NET.Devices.Corsair.CorsairTouchbarRGBDevice" />. /// Represents a generic information for a <see cref="T:RGB.NET.Devices.Corsair.CorsairTouchbarRGBDevice" />.
/// </summary> /// </summary>
public class CorsairTouchbarRGBDeviceInfo : CorsairRGBDeviceInfo public sealed class CorsairTouchbarRGBDeviceInfo : CorsairRGBDeviceInfo
{ {
#region Constructors #region Constructors

View File

@ -10,7 +10,7 @@ namespace RGB.NET.Devices.Corsair;
/// <summary> /// <summary>
/// Represents a unknown corsair device. /// Represents a unknown corsair device.
/// </summary> /// </summary>
public class CorsairUnknownRGBDevice : CorsairRGBDevice<CorsairUnknownRGBDeviceInfo>, IUnknownDevice public sealed class CorsairUnknownRGBDevice : CorsairRGBDevice<CorsairUnknownRGBDeviceInfo>, IUnknownDevice
{ {
#region Constructors #region Constructors

View File

@ -10,7 +10,7 @@ namespace RGB.NET.Devices.Corsair;
/// <summary> /// <summary>
/// Represents a generic information for a <see cref="T:RGB.NET.Devices.Corsair.CorsairUnknownRGBDevice" />. /// Represents a generic information for a <see cref="T:RGB.NET.Devices.Corsair.CorsairUnknownRGBDevice" />.
/// </summary> /// </summary>
public class CorsairUnknownRGBDeviceInfo : CorsairRGBDeviceInfo public sealed class CorsairUnknownRGBDeviceInfo : CorsairRGBDeviceInfo
{ {
#region Constructors #region Constructors

View File

@ -12,7 +12,7 @@ namespace RGB.NET.Devices.DMX;
/// <summary> /// <summary>
/// Represents a device provider responsible for DMX devices. /// Represents a device provider responsible for DMX devices.
/// </summary> /// </summary>
public class DMXDeviceProvider : AbstractRGBDeviceProvider public sealed class DMXDeviceProvider : AbstractRGBDeviceProvider
{ {
#region Properties & Fields #region Properties & Fields

View File

@ -12,7 +12,7 @@ namespace RGB.NET.Devices.DMX.E131;
/// <summary> /// <summary>
/// Represents the data used to create a E1.31 DMX-device. /// Represents the data used to create a E1.31 DMX-device.
/// </summary> /// </summary>
public class E131DMXDeviceDefinition : IDMXDeviceDefinition public sealed class E131DMXDeviceDefinition : IDMXDeviceDefinition
{ {
#region Properties & Fields #region Properties & Fields

View File

@ -7,7 +7,7 @@ namespace RGB.NET.Devices.DMX.E131;
/// <summary> /// <summary>
/// Represents a E1.31-DXM-device. /// Represents a E1.31-DXM-device.
/// </summary> /// </summary>
public class E131Device : AbstractRGBDevice<E131DeviceInfo>, IUnknownDevice public sealed class E131Device : AbstractRGBDevice<E131DeviceInfo>, IUnknownDevice
{ {
#region Properties & Fields #region Properties & Fields

View File

@ -7,7 +7,7 @@ namespace RGB.NET.Devices.DMX.E131;
/// <summary> /// <summary>
/// Represents device information for a <see cref="E131Device"/> />. /// Represents device information for a <see cref="E131Device"/> />.
/// </summary> /// </summary>
public class E131DeviceInfo : IRGBDeviceInfo public sealed class E131DeviceInfo : IRGBDeviceInfo
{ {
#region Constants #region Constants

View File

@ -8,7 +8,7 @@ namespace RGB.NET.Devices.DMX.E131;
/// <summary> /// <summary>
/// Represents the update-queue performing updates for E131-DMX devices. /// Represents the update-queue performing updates for E131-DMX devices.
/// </summary> /// </summary>
public class E131UpdateQueue : UpdateQueue public sealed class E131UpdateQueue : UpdateQueue
{ {
#region Properties & Fields #region Properties & Fields

View File

@ -5,7 +5,7 @@ using RGB.NET.Core;
namespace RGB.NET.Devices.DMX; namespace RGB.NET.Devices.DMX;
internal class LedChannelMapping : IEnumerable<(int channel, Func<Color, byte> getValue)> internal sealed class LedChannelMapping : IEnumerable<(int channel, Func<Color, byte> getValue)>
{ {
#region Properties & Fields #region Properties & Fields

View File

@ -12,7 +12,7 @@ namespace RGB.NET.Devices.Debug;
/// <summary> /// <summary>
/// Represents a device provider responsible for debug devices. /// Represents a device provider responsible for debug devices.
/// </summary> /// </summary>
public class DebugDeviceProvider : AbstractRGBDeviceProvider public sealed class DebugDeviceProvider : AbstractRGBDeviceProvider
{ {
#region Properties & Fields #region Properties & Fields
@ -71,8 +71,6 @@ public class DebugDeviceProvider : AbstractRGBDeviceProvider
base.Dispose(); base.Dispose();
_fakeDeviceDefinitions.Clear(); _fakeDeviceDefinitions.Clear();
GC.SuppressFinalize(this);
} }
#endregion #endregion

View File

@ -3,7 +3,7 @@ using RGB.NET.Core;
namespace RGB.NET.Devices.Debug; namespace RGB.NET.Devices.Debug;
internal class DebugDeviceUpdateQueue : UpdateQueue internal sealed class DebugDeviceUpdateQueue : UpdateQueue
{ {
#region Constructors #region Constructors

View File

@ -9,7 +9,7 @@ namespace RGB.NET.Devices.Debug;
/// <summary> /// <summary>
/// Represents a debug device. /// Represents a debug device.
/// </summary> /// </summary>
public class DebugRGBDevice : AbstractRGBDevice<DebugRGBDeviceInfo>, IUnknownDevice public sealed class DebugRGBDevice : AbstractRGBDevice<DebugRGBDeviceInfo>, IUnknownDevice
{ {
#region Properties & Fields #region Properties & Fields

View File

@ -6,7 +6,7 @@ namespace RGB.NET.Devices.Debug;
/// <summary> /// <summary>
/// Represents device information for a <see cref="DebugRGBDevice"/> />. /// Represents device information for a <see cref="DebugRGBDevice"/> />.
/// </summary> /// </summary>
public class DebugRGBDeviceInfo : IRGBDeviceInfo public sealed class DebugRGBDeviceInfo : IRGBDeviceInfo
{ {
#region Properties & Fields #region Properties & Fields

View File

@ -14,7 +14,7 @@ namespace RGB.NET.Devices.Logitech.HID;
/// </summary> /// </summary>
/// <typeparam name="TLed">The type of the identifier leds are mapped to.</typeparam> /// <typeparam name="TLed">The type of the identifier leds are mapped to.</typeparam>
/// <typeparam name="TData">The type of the custom data added to the HID-device.</typeparam> /// <typeparam name="TData">The type of the custom data added to the HID-device.</typeparam>
public class LightspeedHIDLoader<TLed, TData> : IEnumerable<HIDDeviceDefinition<TLed, TData>> public sealed class LightspeedHIDLoader<TLed, TData> : IEnumerable<HIDDeviceDefinition<TLed, TData>>
where TLed : notnull where TLed : notnull
{ {
#region Constants #region Constants

View File

@ -6,7 +6,7 @@ namespace RGB.NET.Devices.Logitech;
/// <summary> /// <summary>
/// Represents a logitech per-device-lightable device. /// Represents a logitech per-device-lightable device.
/// </summary> /// </summary>
public class LogitechPerDeviceRGBDevice : LogitechRGBDevice<LogitechRGBDeviceInfo>, IUnknownDevice //TODO DarthAffe 18.04.2020: It's know which kind of device this is, but they would need to be separated public sealed class LogitechPerDeviceRGBDevice : LogitechRGBDevice<LogitechRGBDeviceInfo>, IUnknownDevice //TODO DarthAffe 18.04.2020: It's know which kind of device this is, but they would need to be separated
{ {
#region Properties & Fields #region Properties & Fields

View File

@ -8,7 +8,7 @@ namespace RGB.NET.Devices.Logitech;
/// <summary> /// <summary>
/// Represents the update-queue performing updates for logitech per-device devices. /// Represents the update-queue performing updates for logitech per-device devices.
/// </summary> /// </summary>
public class LogitechPerDeviceUpdateQueue : UpdateQueue public sealed class LogitechPerDeviceUpdateQueue : UpdateQueue
{ {
#region Constructors #region Constructors

View File

@ -6,7 +6,7 @@ namespace RGB.NET.Devices.Logitech;
/// <summary> /// <summary>
/// Represents a logitech per-key-lightable device. /// Represents a logitech per-key-lightable device.
/// </summary> /// </summary>
public class LogitechPerKeyRGBDevice : LogitechRGBDevice<LogitechRGBDeviceInfo>, IUnknownDevice //TODO DarthAffe 18.04.2020: It's know which kind of device this is, but they would need to be separated public sealed class LogitechPerKeyRGBDevice : LogitechRGBDevice<LogitechRGBDeviceInfo>, IUnknownDevice //TODO DarthAffe 18.04.2020: It's know which kind of device this is, but they would need to be separated
{ {
#region Properties & Fields #region Properties & Fields

View File

@ -7,7 +7,7 @@ namespace RGB.NET.Devices.Logitech;
/// <summary> /// <summary>
/// Represents the update-queue performing updates for logitech per-key devices. /// Represents the update-queue performing updates for logitech per-key devices.
/// </summary> /// </summary>
public class LogitechPerKeyUpdateQueue : UpdateQueue public sealed class LogitechPerKeyUpdateQueue : UpdateQueue
{ {
#region Constructors #region Constructors
@ -17,8 +17,7 @@ public class LogitechPerKeyUpdateQueue : UpdateQueue
/// <param name="updateTrigger">The update trigger used by this queue.</param> /// <param name="updateTrigger">The update trigger used by this queue.</param>
public LogitechPerKeyUpdateQueue(IDeviceUpdateTrigger updateTrigger) public LogitechPerKeyUpdateQueue(IDeviceUpdateTrigger updateTrigger)
: base(updateTrigger) : base(updateTrigger)
{ { }
}
#endregion #endregion

View File

@ -6,7 +6,7 @@ namespace RGB.NET.Devices.Logitech;
/// <summary> /// <summary>
/// Represents a logitech zone-lightable device. /// Represents a logitech zone-lightable device.
/// </summary> /// </summary>
public class LogitechZoneRGBDevice : LogitechRGBDevice<LogitechRGBDeviceInfo>, IUnknownDevice //TODO DarthAffe 18.04.2020: It's know which kind of device this is, but they would need to be separated public sealed class LogitechZoneRGBDevice : LogitechRGBDevice<LogitechRGBDeviceInfo>, IUnknownDevice //TODO DarthAffe 18.04.2020: It's know which kind of device this is, but they would need to be separated
{ {
#region Properties & Fields #region Properties & Fields

View File

@ -7,7 +7,7 @@ namespace RGB.NET.Devices.Logitech;
/// <summary> /// <summary>
/// Represents the update-queue performing updates for logitech zone devices. /// Represents the update-queue performing updates for logitech zone devices.
/// </summary> /// </summary>
public class LogitechZoneUpdateQueue : UpdateQueue public sealed class LogitechZoneUpdateQueue : UpdateQueue
{ {
#region Properties & Fields #region Properties & Fields

View File

@ -9,7 +9,7 @@ namespace RGB.NET.Devices.Msi.Exceptions;
/// <summary> /// <summary>
/// Represents an exception thrown by the MysticLight-SDK. /// Represents an exception thrown by the MysticLight-SDK.
/// </summary> /// </summary>
public class MysticLightException : ApplicationException public sealed class MysticLightException : ApplicationException
{ {
#region Properties & Fields #region Properties & Fields

View File

@ -8,7 +8,7 @@ namespace RGB.NET.Devices.Msi;
/// <summary> /// <summary>
/// Represents the update-queue performing updates for MSI devices. /// Represents the update-queue performing updates for MSI devices.
/// </summary> /// </summary>
public class MsiDeviceUpdateQueue : UpdateQueue public sealed class MsiDeviceUpdateQueue : UpdateQueue
{ {
#region Properties & Fields #region Properties & Fields

View File

@ -7,7 +7,7 @@ namespace RGB.NET.Devices.Msi;
/// <summary> /// <summary>
/// Represents MSI VGA adapters. /// Represents MSI VGA adapters.
/// </summary> /// </summary>
public class MsiGraphicsCardRGBDevice : MsiRGBDevice<MsiRGBDeviceInfo>, IGraphicsCard public sealed class MsiGraphicsCardRGBDevice : MsiRGBDevice<MsiRGBDeviceInfo>, IGraphicsCard
{ {
#region Constructors #region Constructors

View File

@ -7,7 +7,7 @@ namespace RGB.NET.Devices.Msi;
/// <summary> /// <summary>
/// Represents a MSI mainboard. /// Represents a MSI mainboard.
/// </summary> /// </summary>
public class MsiMainboardRGBDevice : MsiRGBDevice<MsiRGBDeviceInfo>, IMainboard public sealed class MsiMainboardRGBDevice : MsiRGBDevice<MsiRGBDeviceInfo>, IMainboard
{ {
#region Constructors #region Constructors

View File

@ -7,7 +7,7 @@ namespace RGB.NET.Devices.Msi;
/// <summary> /// <summary>
/// Represents a MSI mouse. /// Represents a MSI mouse.
/// </summary> /// </summary>
public class MsiMouseRGBDevice : MsiRGBDevice<MsiRGBDeviceInfo> public sealed class MsiMouseRGBDevice : MsiRGBDevice<MsiRGBDeviceInfo>
{ {
#region Constructors #region Constructors

View File

@ -7,7 +7,7 @@ namespace RGB.NET.Devices.Novation.Attributes;
/// Specifies the color-capability of a field. /// Specifies the color-capability of a field.
/// </summary> /// </summary>
[AttributeUsage(AttributeTargets.Field)] [AttributeUsage(AttributeTargets.Field)]
public class ColorCapabilityAttribute : Attribute public sealed class ColorCapabilityAttribute : Attribute
{ {
#region Properties & Fields #region Properties & Fields

View File

@ -7,7 +7,7 @@ namespace RGB.NET.Devices.Novation.Attributes;
/// Specifies the device-id of a field. /// Specifies the device-id of a field.
/// </summary> /// </summary>
[AttributeUsage(AttributeTargets.Field)] [AttributeUsage(AttributeTargets.Field)]
public class DeviceIdAttribute : Attribute public sealed class DeviceIdAttribute : Attribute
{ {
#region Properties & Fields #region Properties & Fields

View File

@ -7,7 +7,7 @@ namespace RGB.NET.Devices.Novation.Attributes;
/// Specifies the led id mapping of a field. /// Specifies the led id mapping of a field.
/// </summary> /// </summary>
[AttributeUsage(AttributeTargets.Field)] [AttributeUsage(AttributeTargets.Field)]
internal class LedIdMappingAttribute : Attribute internal sealed class LedIdMappingAttribute : Attribute
{ {
#region Properties & Fields #region Properties & Fields

View File

@ -7,7 +7,7 @@ namespace RGB.NET.Devices.Novation;
/// <summary> /// <summary>
/// Represents the update-queue performing updates for a limited-color novation device. /// Represents the update-queue performing updates for a limited-color novation device.
/// </summary> /// </summary>
public class LimitedColorUpdateQueue : MidiUpdateQueue public sealed class LimitedColorUpdateQueue : MidiUpdateQueue
{ {
#region Constructors #region Constructors
@ -37,7 +37,7 @@ public class LimitedColorUpdateQueue : MidiUpdateQueue
/// </summary> /// </summary>
/// <param name="color">The <see cref="Color"/> to convert.</param> /// <param name="color">The <see cref="Color"/> to convert.</param>
/// <returns>The novation-representation of the <see cref="Color"/>.</returns> /// <returns>The novation-representation of the <see cref="Color"/>.</returns>
protected virtual int ConvertColor(in Color color) private static int ConvertColor(in Color color)
{ {
(double hue, double _, double value) = color.GetHSV(); (double hue, double _, double value) = color.GetHSV();

View File

@ -7,7 +7,7 @@ namespace RGB.NET.Devices.Novation;
/// <summary> /// <summary>
/// Represents the update-queue performing updates for a RGB-color novation device. /// Represents the update-queue performing updates for a RGB-color novation device.
/// </summary> /// </summary>
public class RGBColorUpdateQueue : MidiUpdateQueue public sealed class RGBColorUpdateQueue : MidiUpdateQueue
{ {
#region Properties & Fields #region Properties & Fields
@ -165,7 +165,7 @@ public class RGBColorUpdateQueue : MidiUpdateQueue
/// </summary> /// </summary>
/// <param name="color">The <see cref="Color"/> to convert.</param> /// <param name="color">The <see cref="Color"/> to convert.</param>
/// <returns>The novation-representation of the <see cref="Color"/>.</returns> /// <returns>The novation-representation of the <see cref="Color"/>.</returns>
protected virtual int ConvertColor(in Color color) private static int ConvertColor(in Color color)
{ {
int bestVelocity = 0; int bestVelocity = 0;
double bestMatchDistance = double.MaxValue; double bestMatchDistance = double.MaxValue;

View File

@ -8,7 +8,7 @@ namespace RGB.NET.Devices.Novation;
/// <summary> /// <summary>
/// Represents a Novation launchpad. /// Represents a Novation launchpad.
/// </summary> /// </summary>
public class NovationLaunchpadRGBDevice : NovationRGBDevice<NovationLaunchpadRGBDeviceInfo>, ILedMatrix public sealed class NovationLaunchpadRGBDevice : NovationRGBDevice<NovationLaunchpadRGBDeviceInfo>, ILedMatrix
{ {
#region Constructors #region Constructors
@ -50,7 +50,7 @@ public class NovationLaunchpadRGBDevice : NovationRGBDevice<NovationLaunchpadRGB
/// </summary> /// </summary>
/// <returns>The mapping of the device.</returns> /// <returns>The mapping of the device.</returns>
/// <exception cref="ArgumentOutOfRangeException">Thrown if the value of <see cref="NovationLaunchpadRGBDeviceInfo.LedMapping"/> is not known.</exception> /// <exception cref="ArgumentOutOfRangeException">Thrown if the value of <see cref="NovationLaunchpadRGBDeviceInfo.LedMapping"/> is not known.</exception>
protected virtual Dictionary<LedId, (byte mode, byte id, int x, int y)> GetDeviceMapping() private Dictionary<LedId, (byte mode, byte id, int x, int y)> GetDeviceMapping()
=> DeviceInfo.LedMapping switch => DeviceInfo.LedMapping switch
{ {
LedIdMappings.Current => LaunchpadIdMapping.CURRENT, LedIdMappings.Current => LaunchpadIdMapping.CURRENT,

View File

@ -6,7 +6,7 @@ namespace RGB.NET.Devices.Novation;
/// <summary> /// <summary>
/// Represents a generic information for a <see cref="T:RGB.NET.Devices.Novation.NovationLaunchpadRGBDevice" />. /// Represents a generic information for a <see cref="T:RGB.NET.Devices.Novation.NovationLaunchpadRGBDevice" />.
/// </summary> /// </summary>
public class NovationLaunchpadRGBDeviceInfo : NovationRGBDeviceInfo public sealed class NovationLaunchpadRGBDeviceInfo : NovationRGBDeviceInfo
{ {
#region Properties & Fields #region Properties & Fields

View File

@ -13,7 +13,7 @@ namespace RGB.NET.Devices.Novation;
/// <summary> /// <summary>
/// Represents a device provider responsible for Novation devices. /// Represents a device provider responsible for Novation devices.
/// </summary> /// </summary>
public class NovationDeviceProvider : AbstractRGBDeviceProvider public sealed class NovationDeviceProvider : AbstractRGBDeviceProvider
{ {
#region Properties & Fields #region Properties & Fields

View File

@ -4,7 +4,7 @@ using RGB.NET.Core;
namespace RGB.NET.Devices.OpenRGB; namespace RGB.NET.Devices.OpenRGB;
/// <inheritdoc /> /// <inheritdoc />
public class OpenRGBGenericDevice : AbstractOpenRGBDevice<OpenRGBDeviceInfo> public sealed class OpenRGBGenericDevice : AbstractOpenRGBDevice<OpenRGBDeviceInfo>
{ {
#region Constructors #region Constructors
/// <summary> /// <summary>

View File

@ -12,7 +12,7 @@ namespace RGB.NET.Devices.OpenRGB;
/// <summary> /// <summary>
/// Represents the update-queue performing updates for OpenRGB devices. /// Represents the update-queue performing updates for OpenRGB devices.
/// </summary> /// </summary>
public class OpenRGBUpdateQueue : UpdateQueue public sealed class OpenRGBUpdateQueue : UpdateQueue
{ {
#region Properties & Fields #region Properties & Fields

View File

@ -10,7 +10,7 @@ namespace RGB.NET.Devices.OpenRGB;
/// <summary> /// <summary>
/// Represents a device provider responsible for OpenRGB devices. /// Represents a device provider responsible for OpenRGB devices.
/// </summary> /// </summary>
public class OpenRGBDeviceProvider : AbstractRGBDeviceProvider public sealed class OpenRGBDeviceProvider : AbstractRGBDeviceProvider
{ {
#region Properties & Fields #region Properties & Fields
@ -162,8 +162,6 @@ public class OpenRGBDeviceProvider : AbstractRGBDeviceProvider
_clients.Clear(); _clients.Clear();
DeviceDefinitions.Clear(); DeviceDefinitions.Clear();
Devices = Enumerable.Empty<IRGBDevice>(); Devices = Enumerable.Empty<IRGBDevice>();
GC.SuppressFinalize(this);
} }
#endregion #endregion
} }

View File

@ -3,7 +3,7 @@
/// <summary> /// <summary>
/// Represents a definition of an OpenRGB server. /// Represents a definition of an OpenRGB server.
/// </summary> /// </summary>
public class OpenRGBServerDefinition public sealed class OpenRGBServerDefinition
{ {
/// <summary> /// <summary>
/// The name of the client that will appear in the OpenRGB interface. /// The name of the client that will appear in the OpenRGB interface.

View File

@ -4,7 +4,7 @@ using RGB.NET.Core;
namespace RGB.NET.Devices.OpenRGB; namespace RGB.NET.Devices.OpenRGB;
/// <inheritdoc /> /// <inheritdoc />
public class OpenRGBZoneDevice : AbstractOpenRGBDevice<OpenRGBDeviceInfo> public sealed class OpenRGBZoneDevice : AbstractOpenRGBDevice<OpenRGBDeviceInfo>
{ {
#region Properties & Fields #region Properties & Fields

View File

@ -4,7 +4,7 @@ using RGB.NET.Core;
namespace RGB.NET.Devices.OpenRGB; namespace RGB.NET.Devices.OpenRGB;
/// <inheritdoc /> /// <inheritdoc />
public class OpenRGBSegmentDevice : AbstractOpenRGBDevice<OpenRGBDeviceInfo> public sealed class OpenRGBSegmentDevice : AbstractOpenRGBDevice<OpenRGBDeviceInfo>
{ {
#region Properties & Fields #region Properties & Fields

View File

@ -10,7 +10,7 @@ namespace RGB.NET.Devices.PicoPi;
/// <remarks> /// <remarks>
/// Using this requires the libusb driver to be installed! /// Using this requires the libusb driver to be installed!
/// </remarks> /// </remarks>
public class PicoPiBulkUpdateQueue : UpdateQueue public sealed class PicoPiBulkUpdateQueue : UpdateQueue
{ {
#region Properties & Fields #region Properties & Fields

View File

@ -7,7 +7,7 @@ namespace RGB.NET.Devices.PicoPi;
/// <summary> /// <summary>
/// Represents the update-queue performing updates for Pico-Pi HID-devices. /// Represents the update-queue performing updates for Pico-Pi HID-devices.
/// </summary> /// </summary>
public class PicoPiHIDUpdateQueue : UpdateQueue public sealed class PicoPiHIDUpdateQueue : UpdateQueue
{ {
#region Properties & Fields #region Properties & Fields

Some files were not shown because too many files have changed in this diff Show More