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:
parent
d9c244a044
commit
2020992249
@ -11,7 +11,7 @@ namespace RGB.NET.Core;
|
||||
/// <summary>
|
||||
/// Represents a ledgroup containing arbitrary <see cref="T:RGB.NET.Core.Led" />.
|
||||
/// </summary>
|
||||
public class ListLedGroup : AbstractLedGroup
|
||||
public sealed class ListLedGroup : AbstractLedGroup
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
@ -20,7 +20,7 @@ public class ListLedGroup : AbstractLedGroup
|
||||
/// <summary>
|
||||
/// Gets the list containing the <see cref="Led"/> of this <see cref="ListLedGroup"/>.
|
||||
/// </summary>
|
||||
protected IList<Led> GroupLeds { get; } = new List<Led>();
|
||||
private readonly IList<Led> _groupLeds = new List<Led>();
|
||||
|
||||
#endregion
|
||||
|
||||
@ -81,10 +81,10 @@ public class ListLedGroup : AbstractLedGroup
|
||||
/// <param name="leds">The <see cref="Led"/> to add.</param>
|
||||
public void AddLeds(IEnumerable<Led> leds)
|
||||
{
|
||||
lock (GroupLeds)
|
||||
lock (_groupLeds)
|
||||
foreach (Led led in leds)
|
||||
if (!ContainsLed(led))
|
||||
GroupLeds.Add(led);
|
||||
_groupLeds.Add(led);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -99,9 +99,9 @@ public class ListLedGroup : AbstractLedGroup
|
||||
/// <param name="leds">The <see cref="Led"/> to remove.</param>
|
||||
public void RemoveLeds(IEnumerable<Led> leds)
|
||||
{
|
||||
lock (GroupLeds)
|
||||
lock (_groupLeds)
|
||||
foreach (Led led in leds)
|
||||
GroupLeds.Remove(led);
|
||||
_groupLeds.Remove(led);
|
||||
}
|
||||
|
||||
/// <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>
|
||||
public bool ContainsLed(Led led)
|
||||
{
|
||||
lock (GroupLeds)
|
||||
return GroupLeds.Contains(led);
|
||||
lock (_groupLeds)
|
||||
return _groupLeds.Contains(led);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -121,10 +121,10 @@ public class ListLedGroup : AbstractLedGroup
|
||||
/// <param name="groupToMerge">The ledgroup to merge.</param>
|
||||
public void MergeLeds(ILedGroup groupToMerge)
|
||||
{
|
||||
lock (GroupLeds)
|
||||
lock (_groupLeds)
|
||||
foreach (Led led in groupToMerge)
|
||||
if (!GroupLeds.Contains(led))
|
||||
GroupLeds.Add(led);
|
||||
if (!_groupLeds.Contains(led))
|
||||
_groupLeds.Add(led);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
@ -141,18 +141,18 @@ public class ListLedGroup : AbstractLedGroup
|
||||
/// <returns>The list containing the <see cref="T:RGB.NET.Core.Led" />.</returns>
|
||||
public override IList<Led> ToList()
|
||||
{
|
||||
lock (GroupLeds)
|
||||
return new List<Led>(GroupLeds);
|
||||
lock (_groupLeds)
|
||||
return new List<Led>(_groupLeds);
|
||||
}
|
||||
|
||||
protected override IDisposable ToListUnsafe(out IList<Led> leds)
|
||||
{
|
||||
Monitor.Enter(GroupLeds);
|
||||
leds = GroupLeds;
|
||||
Monitor.Enter(_groupLeds);
|
||||
leds = _groupLeds;
|
||||
return _unlockDisposable;
|
||||
}
|
||||
|
||||
private void Unlock() => Monitor.Exit(GroupLeds);
|
||||
private void Unlock() => Monitor.Exit(_groupLeds);
|
||||
|
||||
#endregion
|
||||
}
|
||||
@ -9,7 +9,7 @@ namespace RGB.NET.Core;
|
||||
/// Represents a single LED of a RGB-device.
|
||||
/// </summary>
|
||||
[DebuggerDisplay("{Id} {Color}")]
|
||||
public class Led : Placeable
|
||||
public sealed class Led : Placeable
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@ namespace RGB.NET.Core;
|
||||
/// Represents a mapping from <see cref="LedId"/> to a custom identifier.
|
||||
/// </summary>
|
||||
/// <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
|
||||
{
|
||||
#region Constants
|
||||
|
||||
@ -7,7 +7,7 @@ namespace RGB.NET.Core;
|
||||
/// <summary>
|
||||
/// Represents a brush drawing only a single color.
|
||||
/// </summary>
|
||||
public class SolidColorBrush : AbstractBrush
|
||||
public sealed class SolidColorBrush : AbstractBrush
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
/// <summary>
|
||||
/// Represents a brush drawing a texture.
|
||||
/// </summary>
|
||||
public class TextureBrush : AbstractBrush
|
||||
public sealed class TextureBrush : AbstractBrush
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
namespace RGB.NET.Core;
|
||||
|
||||
internal class EmptyTexture : ITexture
|
||||
internal sealed class EmptyTexture : ITexture
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
|
||||
@ -48,7 +48,7 @@ public interface ICustomUpdateData
|
||||
/// <summary>
|
||||
/// Represents a set of custom data, each indexed by a string-key.
|
||||
/// </summary>
|
||||
public class CustomUpdateData : ICustomUpdateData
|
||||
public sealed class CustomUpdateData : ICustomUpdateData
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
@ -92,7 +92,7 @@ public class CustomUpdateData : ICustomUpdateData
|
||||
#endregion
|
||||
}
|
||||
|
||||
internal class DefaultCustomUpdateData : ICustomUpdateData
|
||||
internal sealed class DefaultCustomUpdateData : ICustomUpdateData
|
||||
{
|
||||
#region Constants
|
||||
|
||||
@ -120,7 +120,7 @@ internal class DefaultCustomUpdateData : ICustomUpdateData
|
||||
|
||||
#region Constructors
|
||||
|
||||
public DefaultCustomUpdateData(bool flushLeds)
|
||||
private DefaultCustomUpdateData(bool flushLeds)
|
||||
{
|
||||
this._flushLeds = flushLeds;
|
||||
}
|
||||
|
||||
@ -10,7 +10,7 @@ namespace RGB.NET.Core;
|
||||
/// <summary>
|
||||
/// Represents an update trigger that triggers in a set interval.
|
||||
/// </summary>
|
||||
public class TimerUpdateTrigger : AbstractUpdateTrigger
|
||||
public sealed class TimerUpdateTrigger : AbstractUpdateTrigger
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
@ -21,17 +21,17 @@ public class TimerUpdateTrigger : AbstractUpdateTrigger
|
||||
/// <summary>
|
||||
/// Gets or sets the update loop of this trigger.
|
||||
/// </summary>
|
||||
protected Task? UpdateTask { get; set; }
|
||||
private Task? _updateTask;
|
||||
|
||||
/// <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>
|
||||
protected CancellationTokenSource? UpdateTokenSource { get; set; }
|
||||
private CancellationTokenSource? _updateTokenSource;
|
||||
|
||||
/// <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>
|
||||
protected CancellationToken UpdateToken { get; set; }
|
||||
private CancellationToken _updateToken;
|
||||
|
||||
private double _updateFrequency = 1.0 / 30.0;
|
||||
/// <summary>
|
||||
@ -88,11 +88,11 @@ public class TimerUpdateTrigger : AbstractUpdateTrigger
|
||||
{
|
||||
lock (_lock)
|
||||
{
|
||||
if (UpdateTask == null)
|
||||
if (_updateTask == null)
|
||||
{
|
||||
UpdateTokenSource?.Dispose();
|
||||
UpdateTokenSource = new CancellationTokenSource();
|
||||
UpdateTask = Task.Factory.StartNew(UpdateLoop, (UpdateToken = UpdateTokenSource.Token), TaskCreationOptions.LongRunning, TaskScheduler.Default);
|
||||
_updateTokenSource?.Dispose();
|
||||
_updateTokenSource = new CancellationTokenSource();
|
||||
_updateTask = Task.Factory.StartNew(UpdateLoop, (_updateToken = _updateTokenSource.Token), TaskCreationOptions.LongRunning, TaskScheduler.Default);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -104,13 +104,13 @@ public class TimerUpdateTrigger : AbstractUpdateTrigger
|
||||
{
|
||||
lock (_lock)
|
||||
{
|
||||
if (UpdateTask != null)
|
||||
if (_updateTask != null)
|
||||
{
|
||||
UpdateTokenSource?.Cancel();
|
||||
_updateTokenSource?.Cancel();
|
||||
try
|
||||
{
|
||||
// ReSharper disable once MethodSupportsCancellation
|
||||
UpdateTask.Wait();
|
||||
_updateTask.Wait();
|
||||
}
|
||||
catch (AggregateException)
|
||||
{
|
||||
@ -118,8 +118,8 @@ public class TimerUpdateTrigger : AbstractUpdateTrigger
|
||||
}
|
||||
finally
|
||||
{
|
||||
UpdateTask.Dispose();
|
||||
UpdateTask = null;
|
||||
_updateTask.Dispose();
|
||||
_updateTask = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -130,7 +130,7 @@ public class TimerUpdateTrigger : AbstractUpdateTrigger
|
||||
OnStartup();
|
||||
|
||||
using (TimerHelper.RequestHighResolutionTimer())
|
||||
while (!UpdateToken.IsCancellationRequested)
|
||||
while (!_updateToken.IsCancellationRequested)
|
||||
LastUpdateTime = TimerHelper.Execute(TimerExecute, UpdateFrequency * 1000);
|
||||
}
|
||||
|
||||
@ -140,7 +140,6 @@ public class TimerUpdateTrigger : AbstractUpdateTrigger
|
||||
public override void Dispose()
|
||||
{
|
||||
Stop();
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@ -12,7 +12,7 @@ namespace RGB.NET.Devices.Asus;
|
||||
/// <summary>
|
||||
/// Represents a device provider responsible for Cooler Master devices.
|
||||
/// </summary>
|
||||
public class AsusDeviceProvider : AbstractRGBDeviceProvider
|
||||
public sealed class AsusDeviceProvider : AbstractRGBDeviceProvider
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
@ -88,8 +88,6 @@ public class AsusDeviceProvider : AbstractRGBDeviceProvider
|
||||
|
||||
_devices = null;
|
||||
_sdk = null;
|
||||
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@ -6,7 +6,7 @@ namespace RGB.NET.Devices.Asus;
|
||||
/// <summary>
|
||||
/// Represents a Asus headset.
|
||||
/// </summary>
|
||||
public class AsusUnspecifiedRGBDevice : AsusRGBDevice<AsusRGBDeviceInfo>, IUnknownDevice
|
||||
public sealed class AsusUnspecifiedRGBDevice : AsusRGBDevice<AsusRGBDeviceInfo>, IUnknownDevice
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@ namespace RGB.NET.Devices.Asus;
|
||||
/// <summary>
|
||||
/// Represents the update-queue performing updates for asus devices.
|
||||
/// </summary>
|
||||
public class AsusUpdateQueue : UpdateQueue
|
||||
public sealed class AsusUpdateQueue : UpdateQueue
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
@ -17,7 +17,7 @@ public class AsusUpdateQueue : UpdateQueue
|
||||
/// <summary>
|
||||
/// The device to be updated.
|
||||
/// </summary>
|
||||
protected IAuraSyncDevice Device { get; }
|
||||
private readonly IAuraSyncDevice _device;
|
||||
|
||||
#endregion
|
||||
|
||||
@ -31,7 +31,7 @@ public class AsusUpdateQueue : UpdateQueue
|
||||
public AsusUpdateQueue(IDeviceUpdateTrigger updateTrigger, IAuraSyncDevice device)
|
||||
: base(updateTrigger)
|
||||
{
|
||||
this.Device = device;
|
||||
this._device = device;
|
||||
|
||||
this._lights = new IAuraRgbLight[device.Lights.Count];
|
||||
for (int i = 0; i < device.Lights.Count; i++)
|
||||
@ -47,9 +47,9 @@ public class AsusUpdateQueue : UpdateQueue
|
||||
{
|
||||
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;
|
||||
|
||||
foreach ((object customData, Color value) in dataSet)
|
||||
@ -87,7 +87,7 @@ public class AsusUpdateQueue : UpdateQueue
|
||||
}
|
||||
}
|
||||
|
||||
Device.Apply();
|
||||
_device.Apply();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -6,7 +6,7 @@ namespace RGB.NET.Devices.Asus;
|
||||
/// <summary>
|
||||
/// Represents a Asus graphicsCard.
|
||||
/// </summary>
|
||||
public class AsusGraphicsCardRGBDevice : AsusRGBDevice<AsusRGBDeviceInfo>, IGraphicsCard
|
||||
public sealed class AsusGraphicsCardRGBDevice : AsusRGBDevice<AsusRGBDeviceInfo>, IGraphicsCard
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ namespace RGB.NET.Devices.Asus;
|
||||
/// <summary>
|
||||
/// Represents a Asus headset.
|
||||
/// </summary>
|
||||
public class AsusHeadsetRGBDevice : AsusRGBDevice<AsusRGBDeviceInfo>, IHeadset
|
||||
public sealed class AsusHeadsetRGBDevice : AsusRGBDevice<AsusRGBDeviceInfo>, IHeadset
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
|
||||
@ -20,7 +20,7 @@ public record AsusKeyboardExtraMapping(Regex Regex, LedMapping<int> LedMapping);
|
||||
/// <summary>
|
||||
/// Represents a Asus keyboard.
|
||||
/// </summary>
|
||||
public class AsusKeyboardRGBDevice : AsusRGBDevice<AsusKeyboardRGBDeviceInfo>, IKeyboard
|
||||
public sealed class AsusKeyboardRGBDevice : AsusRGBDevice<AsusKeyboardRGBDeviceInfo>, IKeyboard
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@ namespace RGB.NET.Devices.Asus;
|
||||
/// <summary>
|
||||
/// Represents a generic information for a <see cref="T:RGB.NET.Devices.Asus.AsusKeyboardRGBDevice" />.
|
||||
/// </summary>
|
||||
public class AsusKeyboardRGBDeviceInfo : AsusRGBDeviceInfo, IKeyboardDeviceInfo
|
||||
public sealed class AsusKeyboardRGBDeviceInfo : AsusRGBDeviceInfo, IKeyboardDeviceInfo
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ namespace RGB.NET.Devices.Asus;
|
||||
/// <summary>
|
||||
/// Represents a Asus mainboard.
|
||||
/// </summary>
|
||||
public class AsusMainboardRGBDevice : AsusRGBDevice<AsusRGBDeviceInfo>, IMainboard
|
||||
public sealed class AsusMainboardRGBDevice : AsusRGBDevice<AsusRGBDeviceInfo>, IMainboard
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ namespace RGB.NET.Devices.Asus;
|
||||
/// <summary>
|
||||
/// Represents a Asus mouse.
|
||||
/// </summary>
|
||||
public class AsusMouseRGBDevice : AsusRGBDevice<AsusRGBDeviceInfo>, IMouse
|
||||
public sealed class AsusMouseRGBDevice : AsusRGBDevice<AsusRGBDeviceInfo>, IMouse
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@ namespace RGB.NET.Devices.CoolerMaster;
|
||||
/// Specifies the <see cref="T:RGB.NET.Core.RGBDeviceType" /> of a field.
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Field)]
|
||||
public class DeviceTypeAttribute : Attribute
|
||||
public sealed class DeviceTypeAttribute : Attribute
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@ namespace RGB.NET.Devices.CoolerMaster;
|
||||
/// <summary>
|
||||
/// Represents a device provider responsible for Cooler Master devices.
|
||||
/// </summary>
|
||||
public class CoolerMasterDeviceProvider : AbstractRGBDeviceProvider
|
||||
public sealed class CoolerMasterDeviceProvider : AbstractRGBDeviceProvider
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
@ -100,8 +100,6 @@ public class CoolerMasterDeviceProvider : AbstractRGBDeviceProvider
|
||||
|
||||
try { _CoolerMasterSDK.Reload(); }
|
||||
catch { /* Unlucky.. */ }
|
||||
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@ -4,8 +4,6 @@
|
||||
using System.ComponentModel;
|
||||
using RGB.NET.Core;
|
||||
|
||||
#pragma warning disable 1591 // Missing XML comment for publicly visible type or member
|
||||
|
||||
namespace RGB.NET.Devices.CoolerMaster;
|
||||
|
||||
/// <summary>
|
||||
|
||||
@ -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
|
||||
}
|
||||
@ -8,7 +8,7 @@ namespace RGB.NET.Devices.CoolerMaster;
|
||||
/// <summary>
|
||||
/// Represents the update-queue performing updates for cooler master devices.
|
||||
/// </summary>
|
||||
public class CoolerMasterUpdateQueue : UpdateQueue
|
||||
public sealed class CoolerMasterUpdateQueue : UpdateQueue
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@ namespace RGB.NET.Devices.CoolerMaster;
|
||||
/// <summary>
|
||||
/// Represents a CoolerMaster keyboard.
|
||||
/// </summary>
|
||||
public class CoolerMasterKeyboardRGBDevice : CoolerMasterRGBDevice<CoolerMasterKeyboardRGBDeviceInfo>, IKeyboard
|
||||
public sealed class CoolerMasterKeyboardRGBDevice : CoolerMasterRGBDevice<CoolerMasterKeyboardRGBDeviceInfo>, IKeyboard
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@ namespace RGB.NET.Devices.CoolerMaster;
|
||||
/// <summary>
|
||||
/// Represents a generic information for a <see cref="T:RGB.NET.Devices.CoolerMaster.CoolerMasterKeyboardRGBDevice" />.
|
||||
/// </summary>
|
||||
public class CoolerMasterKeyboardRGBDeviceInfo : CoolerMasterRGBDeviceInfo, IKeyboardDeviceInfo
|
||||
public sealed class CoolerMasterKeyboardRGBDeviceInfo : CoolerMasterRGBDeviceInfo, IKeyboardDeviceInfo
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@ namespace RGB.NET.Devices.CoolerMaster;
|
||||
/// <summary>
|
||||
/// Represents a CoolerMaster mouse.
|
||||
/// </summary>
|
||||
public class CoolerMasterMouseRGBDevice : CoolerMasterRGBDevice<CoolerMasterMouseRGBDeviceInfo>, IMouse
|
||||
public sealed class CoolerMasterMouseRGBDevice : CoolerMasterRGBDevice<CoolerMasterMouseRGBDeviceInfo>, IMouse
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ namespace RGB.NET.Devices.CoolerMaster;
|
||||
/// <summary>
|
||||
/// Represents a generic information for a <see cref="T:RGB.NET.Devices.CoolerMaster.CoolerMasterMouseRGBDevice" />.
|
||||
/// </summary>
|
||||
public class CoolerMasterMouseRGBDeviceInfo : CoolerMasterRGBDeviceInfo
|
||||
public sealed class CoolerMasterMouseRGBDeviceInfo : CoolerMasterRGBDeviceInfo
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ namespace RGB.NET.Devices.Corsair;
|
||||
/// <summary>
|
||||
/// Represents a corsair cooler.
|
||||
/// </summary>
|
||||
public class CorsairCoolerRGBDevice : CorsairRGBDevice<CorsairCoolerRGBDeviceInfo>, ICooler
|
||||
public sealed class CorsairCoolerRGBDevice : CorsairRGBDevice<CorsairCoolerRGBDeviceInfo>, ICooler
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ namespace RGB.NET.Devices.Corsair;
|
||||
/// <summary>
|
||||
/// Represents a generic information for a <see cref="T:RGB.NET.Devices.Corsair.CorsairCoolerRGBDevice" />.
|
||||
/// </summary>
|
||||
public class CorsairCoolerRGBDeviceInfo : CorsairRGBDeviceInfo
|
||||
public sealed class CorsairCoolerRGBDeviceInfo : CorsairRGBDeviceInfo
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@ namespace RGB.NET.Devices.Corsair;
|
||||
/// <summary>
|
||||
/// Represents a device provider responsible for corsair (CUE) devices.
|
||||
/// </summary>
|
||||
public class CorsairDeviceProvider : AbstractRGBDeviceProvider
|
||||
public sealed class CorsairDeviceProvider : AbstractRGBDeviceProvider
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
@ -306,8 +306,6 @@ public class CorsairDeviceProvider : AbstractRGBDeviceProvider
|
||||
|
||||
try { _CUESDK.CorsairDisconnect(); } catch { /* at least we tried */ }
|
||||
try { _CUESDK.UnloadCUESDK(); } catch { /* at least we tried */ }
|
||||
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@ -9,7 +9,7 @@ namespace RGB.NET.Devices.Corsair;
|
||||
/// <summary>
|
||||
/// Represents an exception thrown by the CUE.
|
||||
/// </summary>
|
||||
public class CUEException : ApplicationException
|
||||
public sealed class CUEException : ApplicationException
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ namespace RGB.NET.Devices.Corsair;
|
||||
/// <summary>
|
||||
/// Represents a corsair fan.
|
||||
/// </summary>
|
||||
public class CorsairFanRGBDevice : CorsairRGBDevice<CorsairFanRGBDeviceInfo>, IFan
|
||||
public sealed class CorsairFanRGBDevice : CorsairRGBDevice<CorsairFanRGBDeviceInfo>, IFan
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ namespace RGB.NET.Devices.Corsair;
|
||||
/// <summary>
|
||||
/// Represents a generic information for a <see cref="T:RGB.NET.Devices.Corsair.CorsairFanRGBDevice" />.
|
||||
/// </summary>
|
||||
public class CorsairFanRGBDeviceInfo : CorsairRGBDeviceInfo
|
||||
public sealed class CorsairFanRGBDeviceInfo : CorsairRGBDeviceInfo
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
|
||||
@ -9,7 +9,7 @@ namespace RGB.NET.Devices.Corsair;
|
||||
/// <summary>
|
||||
/// Represents the update-queue performing updates for corsair devices.
|
||||
/// </summary>
|
||||
public class CorsairDeviceUpdateQueue : UpdateQueue
|
||||
public sealed class CorsairDeviceUpdateQueue : UpdateQueue
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
@ -76,8 +76,6 @@ public class CorsairDeviceUpdateQueue : UpdateQueue
|
||||
|
||||
_isDisposed = true;
|
||||
Marshal.FreeHGlobal(_colorPtr);
|
||||
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@ -7,7 +7,7 @@ namespace RGB.NET.Devices.Corsair;
|
||||
/// <summary>
|
||||
/// Represents version information for the Corsair-SDK
|
||||
/// </summary>
|
||||
public class CorsairSessionDetails
|
||||
public sealed class CorsairSessionDetails
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ namespace RGB.NET.Devices.Corsair;
|
||||
/// <summary>
|
||||
/// Represents a corsair graphics card.
|
||||
/// </summary>
|
||||
public class CorsairGraphicsCardRGBDevice : CorsairRGBDevice<CorsairGraphicsCardRGBDeviceInfo>, IGraphicsCard
|
||||
public sealed class CorsairGraphicsCardRGBDevice : CorsairRGBDevice<CorsairGraphicsCardRGBDeviceInfo>, IGraphicsCard
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ namespace RGB.NET.Devices.Corsair;
|
||||
/// <summary>
|
||||
/// Represents a generic information for a <see cref="T:RGB.NET.Devices.Corsair.CorsairGraphicsCardRGBDevice" />.
|
||||
/// </summary>
|
||||
public class CorsairGraphicsCardRGBDeviceInfo : CorsairRGBDeviceInfo
|
||||
public sealed class CorsairGraphicsCardRGBDeviceInfo : CorsairRGBDeviceInfo
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ namespace RGB.NET.Devices.Corsair;
|
||||
/// <summary>
|
||||
/// Represents a corsair headset.
|
||||
/// </summary>
|
||||
public class CorsairHeadsetRGBDevice : CorsairRGBDevice<CorsairHeadsetRGBDeviceInfo>, IHeadset
|
||||
public sealed class CorsairHeadsetRGBDevice : CorsairRGBDevice<CorsairHeadsetRGBDeviceInfo>, IHeadset
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@ namespace RGB.NET.Devices.Corsair;
|
||||
/// <summary>
|
||||
/// Represents a generic information for a <see cref="T:RGB.NET.Devices.Corsair.CorsairHeadsetRGBDevice" />.
|
||||
/// </summary>
|
||||
public class CorsairHeadsetRGBDeviceInfo : CorsairRGBDeviceInfo
|
||||
public sealed class CorsairHeadsetRGBDeviceInfo : CorsairRGBDeviceInfo
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ namespace RGB.NET.Devices.Corsair;
|
||||
/// <summary>
|
||||
/// Represents a corsair headset stand.
|
||||
/// </summary>
|
||||
public class CorsairHeadsetStandRGBDevice : CorsairRGBDevice<CorsairHeadsetStandRGBDeviceInfo>, IHeadsetStand
|
||||
public sealed class CorsairHeadsetStandRGBDevice : CorsairRGBDevice<CorsairHeadsetStandRGBDeviceInfo>, IHeadsetStand
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@ namespace RGB.NET.Devices.Corsair;
|
||||
/// <summary>
|
||||
/// Represents a generic information for a <see cref="T:RGB.NET.Devices.Corsair.CorsairHeadsetStandRGBDevice" />.
|
||||
/// </summary>
|
||||
public class CorsairHeadsetStandRGBDeviceInfo : CorsairRGBDeviceInfo
|
||||
public sealed class CorsairHeadsetStandRGBDeviceInfo : CorsairRGBDeviceInfo
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ namespace RGB.NET.Devices.Corsair;
|
||||
/// <summary>
|
||||
/// Represents a corsair keyboard.
|
||||
/// </summary>
|
||||
public class CorsairKeyboardRGBDevice : CorsairRGBDevice<CorsairKeyboardRGBDeviceInfo>, IKeyboard
|
||||
public sealed class CorsairKeyboardRGBDevice : CorsairRGBDevice<CorsairKeyboardRGBDeviceInfo>, IKeyboard
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
|
||||
@ -9,7 +9,7 @@ namespace RGB.NET.Devices.Corsair;
|
||||
/// <summary>
|
||||
/// Represents a generic information for a <see cref="T:RGB.NET.Devices.Corsair.CorsairKeyboardRGBDevice" />.
|
||||
/// </summary>
|
||||
public class CorsairKeyboardRGBDeviceInfo : CorsairRGBDeviceInfo, IKeyboardDeviceInfo
|
||||
public sealed class CorsairKeyboardRGBDeviceInfo : CorsairRGBDeviceInfo, IKeyboardDeviceInfo
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ namespace RGB.NET.Devices.Corsair;
|
||||
/// <summary>
|
||||
/// Represents a corsair ledStrip.
|
||||
/// </summary>
|
||||
public class CorsairLedStripRGBDevice : CorsairRGBDevice<CorsairLedStripRGBDeviceInfo>, ILedStripe
|
||||
public sealed class CorsairLedStripRGBDevice : CorsairRGBDevice<CorsairLedStripRGBDeviceInfo>, ILedStripe
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ namespace RGB.NET.Devices.Corsair;
|
||||
/// <summary>
|
||||
/// Represents a generic information for a <see cref="T:RGB.NET.Devices.Corsair.CorsairLedStripRGBDevice" />.
|
||||
/// </summary>
|
||||
public class CorsairLedStripRGBDeviceInfo : CorsairRGBDeviceInfo
|
||||
public sealed class CorsairLedStripRGBDeviceInfo : CorsairRGBDeviceInfo
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ namespace RGB.NET.Devices.Corsair;
|
||||
/// <summary>
|
||||
/// Represents a corsair memory.
|
||||
/// </summary>
|
||||
public class CorsairMainboardRGBDevice : CorsairRGBDevice<CorsairMainboardRGBDeviceInfo>, IMainboard
|
||||
public sealed class CorsairMainboardRGBDevice : CorsairRGBDevice<CorsairMainboardRGBDeviceInfo>, IMainboard
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ namespace RGB.NET.Devices.Corsair;
|
||||
/// <summary>
|
||||
/// Represents a generic information for a <see cref="T:RGB.NET.Devices.Corsair.CorsairMainboardRGBDevice" />.
|
||||
/// </summary>
|
||||
public class CorsairMainboardRGBDeviceInfo : CorsairRGBDeviceInfo
|
||||
public sealed class CorsairMainboardRGBDeviceInfo : CorsairRGBDeviceInfo
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ namespace RGB.NET.Devices.Corsair;
|
||||
/// <summary>
|
||||
/// Represents a corsair memory.
|
||||
/// </summary>
|
||||
public class CorsairMemoryRGBDevice : CorsairRGBDevice<CorsairMemoryRGBDeviceInfo>, IDRAM
|
||||
public sealed class CorsairMemoryRGBDevice : CorsairRGBDevice<CorsairMemoryRGBDeviceInfo>, IDRAM
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ namespace RGB.NET.Devices.Corsair;
|
||||
/// <summary>
|
||||
/// Represents a generic information for a <see cref="T:RGB.NET.Devices.Corsair.CorsairMemoryRGBDevice" />.
|
||||
/// </summary>
|
||||
public class CorsairMemoryRGBDeviceInfo : CorsairRGBDeviceInfo
|
||||
public sealed class CorsairMemoryRGBDeviceInfo : CorsairRGBDeviceInfo
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ namespace RGB.NET.Devices.Corsair;
|
||||
/// <summary>
|
||||
/// Represents a corsair mouse.
|
||||
/// </summary>
|
||||
public class CorsairMouseRGBDevice : CorsairRGBDevice<CorsairMouseRGBDeviceInfo>, IMouse
|
||||
public sealed class CorsairMouseRGBDevice : CorsairRGBDevice<CorsairMouseRGBDeviceInfo>, IMouse
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@ namespace RGB.NET.Devices.Corsair;
|
||||
/// <summary>
|
||||
/// Represents a generic information for a <see cref="T:RGB.NET.Devices.Corsair.CorsairMouseRGBDevice" />.
|
||||
/// </summary>
|
||||
public class CorsairMouseRGBDeviceInfo : CorsairRGBDeviceInfo
|
||||
public sealed class CorsairMouseRGBDeviceInfo : CorsairRGBDeviceInfo
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ namespace RGB.NET.Devices.Corsair;
|
||||
/// <summary>
|
||||
/// Represents a corsair mousepad.
|
||||
/// </summary>
|
||||
public class CorsairMousepadRGBDevice : CorsairRGBDevice<CorsairMousepadRGBDeviceInfo>, IMousepad
|
||||
public sealed class CorsairMousepadRGBDevice : CorsairRGBDevice<CorsairMousepadRGBDeviceInfo>, IMousepad
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@ namespace RGB.NET.Devices.Corsair;
|
||||
/// <summary>
|
||||
/// Represents a generic information for a <see cref="T:RGB.NET.Devices.Corsair.CorsairMousepadRGBDevice" />.
|
||||
/// </summary>
|
||||
public class CorsairMousepadRGBDeviceInfo : CorsairRGBDeviceInfo
|
||||
public sealed class CorsairMousepadRGBDeviceInfo : CorsairRGBDeviceInfo
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@ namespace RGB.NET.Devices.Corsair.Native;
|
||||
/// iCUE-SDK: contains device search filter
|
||||
/// </summary>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
internal class _CorsairDeviceFilter
|
||||
internal sealed class _CorsairDeviceFilter
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@ namespace RGB.NET.Devices.Corsair.Native;
|
||||
/// iCUE-SDK: contains information about device
|
||||
/// </summary>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
internal class _CorsairDeviceInfo
|
||||
internal sealed class _CorsairDeviceInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// iCUE-SDK: enum describing device type
|
||||
|
||||
@ -13,7 +13,7 @@ namespace RGB.NET.Devices.Corsair.Native;
|
||||
/// iCUE-SDK: contains led id and position of led
|
||||
/// </summary>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
internal class _CorsairLedPosition
|
||||
internal sealed class _CorsairLedPosition
|
||||
{
|
||||
/// <summary>
|
||||
/// iCUE-SDK: unique identifier of led
|
||||
|
||||
@ -13,7 +13,7 @@ namespace RGB.NET.Devices.Corsair.Native;
|
||||
/// iCUE-SDK: contains information about SDK and iCUE versions
|
||||
/// </summary>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
internal class _CorsairSessionDetails
|
||||
internal sealed class _CorsairSessionDetails
|
||||
{
|
||||
/// <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.
|
||||
|
||||
@ -13,7 +13,7 @@ namespace RGB.NET.Devices.Corsair.Native;
|
||||
/// iCUE-SDK: contains information about session state and client/server versions
|
||||
/// </summary>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
internal class _CorsairSessionStateChanged
|
||||
internal sealed class _CorsairSessionStateChanged
|
||||
{
|
||||
/// <summary>
|
||||
/// iCUE-SDK: new session state which SDK client has been transitioned to
|
||||
|
||||
@ -13,7 +13,7 @@ namespace RGB.NET.Devices.Corsair.Native;
|
||||
/// iCUE-SDK: contains information about version that consists of three components
|
||||
/// </summary>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
internal class _CorsairVersion
|
||||
internal sealed class _CorsairVersion
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ namespace RGB.NET.Devices.Corsair;
|
||||
/// <summary>
|
||||
/// Represents a corsair touchbar.
|
||||
/// </summary>
|
||||
public class CorsairTouchbarRGBDevice : CorsairRGBDevice<CorsairTouchbarRGBDeviceInfo>, ILedStripe
|
||||
public sealed class CorsairTouchbarRGBDevice : CorsairRGBDevice<CorsairTouchbarRGBDeviceInfo>, ILedStripe
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ namespace RGB.NET.Devices.Corsair;
|
||||
/// <summary>
|
||||
/// Represents a generic information for a <see cref="T:RGB.NET.Devices.Corsair.CorsairTouchbarRGBDevice" />.
|
||||
/// </summary>
|
||||
public class CorsairTouchbarRGBDeviceInfo : CorsairRGBDeviceInfo
|
||||
public sealed class CorsairTouchbarRGBDeviceInfo : CorsairRGBDeviceInfo
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ namespace RGB.NET.Devices.Corsair;
|
||||
/// <summary>
|
||||
/// Represents a unknown corsair device.
|
||||
/// </summary>
|
||||
public class CorsairUnknownRGBDevice : CorsairRGBDevice<CorsairUnknownRGBDeviceInfo>, IUnknownDevice
|
||||
public sealed class CorsairUnknownRGBDevice : CorsairRGBDevice<CorsairUnknownRGBDeviceInfo>, IUnknownDevice
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ namespace RGB.NET.Devices.Corsair;
|
||||
/// <summary>
|
||||
/// Represents a generic information for a <see cref="T:RGB.NET.Devices.Corsair.CorsairUnknownRGBDevice" />.
|
||||
/// </summary>
|
||||
public class CorsairUnknownRGBDeviceInfo : CorsairRGBDeviceInfo
|
||||
public sealed class CorsairUnknownRGBDeviceInfo : CorsairRGBDeviceInfo
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@ namespace RGB.NET.Devices.DMX;
|
||||
/// <summary>
|
||||
/// Represents a device provider responsible for DMX devices.
|
||||
/// </summary>
|
||||
public class DMXDeviceProvider : AbstractRGBDeviceProvider
|
||||
public sealed class DMXDeviceProvider : AbstractRGBDeviceProvider
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@ namespace RGB.NET.Devices.DMX.E131;
|
||||
/// <summary>
|
||||
/// Represents the data used to create a E1.31 DMX-device.
|
||||
/// </summary>
|
||||
public class E131DMXDeviceDefinition : IDMXDeviceDefinition
|
||||
public sealed class E131DMXDeviceDefinition : IDMXDeviceDefinition
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@ namespace RGB.NET.Devices.DMX.E131;
|
||||
/// <summary>
|
||||
/// Represents a E1.31-DXM-device.
|
||||
/// </summary>
|
||||
public class E131Device : AbstractRGBDevice<E131DeviceInfo>, IUnknownDevice
|
||||
public sealed class E131Device : AbstractRGBDevice<E131DeviceInfo>, IUnknownDevice
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@ namespace RGB.NET.Devices.DMX.E131;
|
||||
/// <summary>
|
||||
/// Represents device information for a <see cref="E131Device"/> />.
|
||||
/// </summary>
|
||||
public class E131DeviceInfo : IRGBDeviceInfo
|
||||
public sealed class E131DeviceInfo : IRGBDeviceInfo
|
||||
{
|
||||
#region Constants
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@ namespace RGB.NET.Devices.DMX.E131;
|
||||
/// <summary>
|
||||
/// Represents the update-queue performing updates for E131-DMX devices.
|
||||
/// </summary>
|
||||
public class E131UpdateQueue : UpdateQueue
|
||||
public sealed class E131UpdateQueue : UpdateQueue
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@ using RGB.NET.Core;
|
||||
|
||||
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
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@ namespace RGB.NET.Devices.Debug;
|
||||
/// <summary>
|
||||
/// Represents a device provider responsible for debug devices.
|
||||
/// </summary>
|
||||
public class DebugDeviceProvider : AbstractRGBDeviceProvider
|
||||
public sealed class DebugDeviceProvider : AbstractRGBDeviceProvider
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
@ -71,8 +71,6 @@ public class DebugDeviceProvider : AbstractRGBDeviceProvider
|
||||
base.Dispose();
|
||||
|
||||
_fakeDeviceDefinitions.Clear();
|
||||
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@ -3,7 +3,7 @@ using RGB.NET.Core;
|
||||
|
||||
namespace RGB.NET.Devices.Debug;
|
||||
|
||||
internal class DebugDeviceUpdateQueue : UpdateQueue
|
||||
internal sealed class DebugDeviceUpdateQueue : UpdateQueue
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
|
||||
@ -9,7 +9,7 @@ namespace RGB.NET.Devices.Debug;
|
||||
/// <summary>
|
||||
/// Represents a debug device.
|
||||
/// </summary>
|
||||
public class DebugRGBDevice : AbstractRGBDevice<DebugRGBDeviceInfo>, IUnknownDevice
|
||||
public sealed class DebugRGBDevice : AbstractRGBDevice<DebugRGBDeviceInfo>, IUnknownDevice
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ namespace RGB.NET.Devices.Debug;
|
||||
/// <summary>
|
||||
/// Represents device information for a <see cref="DebugRGBDevice"/> />.
|
||||
/// </summary>
|
||||
public class DebugRGBDeviceInfo : IRGBDeviceInfo
|
||||
public sealed class DebugRGBDeviceInfo : IRGBDeviceInfo
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
|
||||
@ -14,7 +14,7 @@ namespace RGB.NET.Devices.Logitech.HID;
|
||||
/// </summary>
|
||||
/// <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>
|
||||
public class LightspeedHIDLoader<TLed, TData> : IEnumerable<HIDDeviceDefinition<TLed, TData>>
|
||||
public sealed class LightspeedHIDLoader<TLed, TData> : IEnumerable<HIDDeviceDefinition<TLed, TData>>
|
||||
where TLed : notnull
|
||||
{
|
||||
#region Constants
|
||||
|
||||
@ -6,7 +6,7 @@ namespace RGB.NET.Devices.Logitech;
|
||||
/// <summary>
|
||||
/// Represents a logitech per-device-lightable device.
|
||||
/// </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
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@ namespace RGB.NET.Devices.Logitech;
|
||||
/// <summary>
|
||||
/// Represents the update-queue performing updates for logitech per-device devices.
|
||||
/// </summary>
|
||||
public class LogitechPerDeviceUpdateQueue : UpdateQueue
|
||||
public sealed class LogitechPerDeviceUpdateQueue : UpdateQueue
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ namespace RGB.NET.Devices.Logitech;
|
||||
/// <summary>
|
||||
/// Represents a logitech per-key-lightable device.
|
||||
/// </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
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@ namespace RGB.NET.Devices.Logitech;
|
||||
/// <summary>
|
||||
/// Represents the update-queue performing updates for logitech per-key devices.
|
||||
/// </summary>
|
||||
public class LogitechPerKeyUpdateQueue : UpdateQueue
|
||||
public sealed class LogitechPerKeyUpdateQueue : UpdateQueue
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
@ -17,8 +17,7 @@ public class LogitechPerKeyUpdateQueue : UpdateQueue
|
||||
/// <param name="updateTrigger">The update trigger used by this queue.</param>
|
||||
public LogitechPerKeyUpdateQueue(IDeviceUpdateTrigger updateTrigger)
|
||||
: base(updateTrigger)
|
||||
{
|
||||
}
|
||||
{ }
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ namespace RGB.NET.Devices.Logitech;
|
||||
/// <summary>
|
||||
/// Represents a logitech zone-lightable device.
|
||||
/// </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
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@ namespace RGB.NET.Devices.Logitech;
|
||||
/// <summary>
|
||||
/// Represents the update-queue performing updates for logitech zone devices.
|
||||
/// </summary>
|
||||
public class LogitechZoneUpdateQueue : UpdateQueue
|
||||
public sealed class LogitechZoneUpdateQueue : UpdateQueue
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
|
||||
@ -9,7 +9,7 @@ namespace RGB.NET.Devices.Msi.Exceptions;
|
||||
/// <summary>
|
||||
/// Represents an exception thrown by the MysticLight-SDK.
|
||||
/// </summary>
|
||||
public class MysticLightException : ApplicationException
|
||||
public sealed class MysticLightException : ApplicationException
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@ namespace RGB.NET.Devices.Msi;
|
||||
/// <summary>
|
||||
/// Represents the update-queue performing updates for MSI devices.
|
||||
/// </summary>
|
||||
public class MsiDeviceUpdateQueue : UpdateQueue
|
||||
public sealed class MsiDeviceUpdateQueue : UpdateQueue
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@ namespace RGB.NET.Devices.Msi;
|
||||
/// <summary>
|
||||
/// Represents MSI VGA adapters.
|
||||
/// </summary>
|
||||
public class MsiGraphicsCardRGBDevice : MsiRGBDevice<MsiRGBDeviceInfo>, IGraphicsCard
|
||||
public sealed class MsiGraphicsCardRGBDevice : MsiRGBDevice<MsiRGBDeviceInfo>, IGraphicsCard
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@ namespace RGB.NET.Devices.Msi;
|
||||
/// <summary>
|
||||
/// Represents a MSI mainboard.
|
||||
/// </summary>
|
||||
public class MsiMainboardRGBDevice : MsiRGBDevice<MsiRGBDeviceInfo>, IMainboard
|
||||
public sealed class MsiMainboardRGBDevice : MsiRGBDevice<MsiRGBDeviceInfo>, IMainboard
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@ namespace RGB.NET.Devices.Msi;
|
||||
/// <summary>
|
||||
/// Represents a MSI mouse.
|
||||
/// </summary>
|
||||
public class MsiMouseRGBDevice : MsiRGBDevice<MsiRGBDeviceInfo>
|
||||
public sealed class MsiMouseRGBDevice : MsiRGBDevice<MsiRGBDeviceInfo>
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@ namespace RGB.NET.Devices.Novation.Attributes;
|
||||
/// Specifies the color-capability of a field.
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Field)]
|
||||
public class ColorCapabilityAttribute : Attribute
|
||||
public sealed class ColorCapabilityAttribute : Attribute
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@ namespace RGB.NET.Devices.Novation.Attributes;
|
||||
/// Specifies the device-id of a field.
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Field)]
|
||||
public class DeviceIdAttribute : Attribute
|
||||
public sealed class DeviceIdAttribute : Attribute
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@ namespace RGB.NET.Devices.Novation.Attributes;
|
||||
/// Specifies the led id mapping of a field.
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Field)]
|
||||
internal class LedIdMappingAttribute : Attribute
|
||||
internal sealed class LedIdMappingAttribute : Attribute
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@ namespace RGB.NET.Devices.Novation;
|
||||
/// <summary>
|
||||
/// Represents the update-queue performing updates for a limited-color novation device.
|
||||
/// </summary>
|
||||
public class LimitedColorUpdateQueue : MidiUpdateQueue
|
||||
public sealed class LimitedColorUpdateQueue : MidiUpdateQueue
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
@ -37,7 +37,7 @@ public class LimitedColorUpdateQueue : MidiUpdateQueue
|
||||
/// </summary>
|
||||
/// <param name="color">The <see cref="Color"/> to convert.</param>
|
||||
/// <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();
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@ namespace RGB.NET.Devices.Novation;
|
||||
/// <summary>
|
||||
/// Represents the update-queue performing updates for a RGB-color novation device.
|
||||
/// </summary>
|
||||
public class RGBColorUpdateQueue : MidiUpdateQueue
|
||||
public sealed class RGBColorUpdateQueue : MidiUpdateQueue
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
@ -165,7 +165,7 @@ public class RGBColorUpdateQueue : MidiUpdateQueue
|
||||
/// </summary>
|
||||
/// <param name="color">The <see cref="Color"/> to convert.</param>
|
||||
/// <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;
|
||||
double bestMatchDistance = double.MaxValue;
|
||||
|
||||
@ -8,7 +8,7 @@ namespace RGB.NET.Devices.Novation;
|
||||
/// <summary>
|
||||
/// Represents a Novation launchpad.
|
||||
/// </summary>
|
||||
public class NovationLaunchpadRGBDevice : NovationRGBDevice<NovationLaunchpadRGBDeviceInfo>, ILedMatrix
|
||||
public sealed class NovationLaunchpadRGBDevice : NovationRGBDevice<NovationLaunchpadRGBDeviceInfo>, ILedMatrix
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
@ -50,7 +50,7 @@ public class NovationLaunchpadRGBDevice : NovationRGBDevice<NovationLaunchpadRGB
|
||||
/// </summary>
|
||||
/// <returns>The mapping of the device.</returns>
|
||||
/// <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
|
||||
{
|
||||
LedIdMappings.Current => LaunchpadIdMapping.CURRENT,
|
||||
|
||||
@ -6,7 +6,7 @@ namespace RGB.NET.Devices.Novation;
|
||||
/// <summary>
|
||||
/// Represents a generic information for a <see cref="T:RGB.NET.Devices.Novation.NovationLaunchpadRGBDevice" />.
|
||||
/// </summary>
|
||||
public class NovationLaunchpadRGBDeviceInfo : NovationRGBDeviceInfo
|
||||
public sealed class NovationLaunchpadRGBDeviceInfo : NovationRGBDeviceInfo
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@ namespace RGB.NET.Devices.Novation;
|
||||
/// <summary>
|
||||
/// Represents a device provider responsible for Novation devices.
|
||||
/// </summary>
|
||||
public class NovationDeviceProvider : AbstractRGBDeviceProvider
|
||||
public sealed class NovationDeviceProvider : AbstractRGBDeviceProvider
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ using RGB.NET.Core;
|
||||
namespace RGB.NET.Devices.OpenRGB;
|
||||
|
||||
/// <inheritdoc />
|
||||
public class OpenRGBGenericDevice : AbstractOpenRGBDevice<OpenRGBDeviceInfo>
|
||||
public sealed class OpenRGBGenericDevice : AbstractOpenRGBDevice<OpenRGBDeviceInfo>
|
||||
{
|
||||
#region Constructors
|
||||
/// <summary>
|
||||
|
||||
@ -12,7 +12,7 @@ namespace RGB.NET.Devices.OpenRGB;
|
||||
/// <summary>
|
||||
/// Represents the update-queue performing updates for OpenRGB devices.
|
||||
/// </summary>
|
||||
public class OpenRGBUpdateQueue : UpdateQueue
|
||||
public sealed class OpenRGBUpdateQueue : UpdateQueue
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ namespace RGB.NET.Devices.OpenRGB;
|
||||
/// <summary>
|
||||
/// Represents a device provider responsible for OpenRGB devices.
|
||||
/// </summary>
|
||||
public class OpenRGBDeviceProvider : AbstractRGBDeviceProvider
|
||||
public sealed class OpenRGBDeviceProvider : AbstractRGBDeviceProvider
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
@ -162,8 +162,6 @@ public class OpenRGBDeviceProvider : AbstractRGBDeviceProvider
|
||||
_clients.Clear();
|
||||
DeviceDefinitions.Clear();
|
||||
Devices = Enumerable.Empty<IRGBDevice>();
|
||||
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
/// <summary>
|
||||
/// Represents a definition of an OpenRGB server.
|
||||
/// </summary>
|
||||
public class OpenRGBServerDefinition
|
||||
public sealed class OpenRGBServerDefinition
|
||||
{
|
||||
/// <summary>
|
||||
/// The name of the client that will appear in the OpenRGB interface.
|
||||
|
||||
@ -4,7 +4,7 @@ using RGB.NET.Core;
|
||||
namespace RGB.NET.Devices.OpenRGB;
|
||||
|
||||
/// <inheritdoc />
|
||||
public class OpenRGBZoneDevice : AbstractOpenRGBDevice<OpenRGBDeviceInfo>
|
||||
public sealed class OpenRGBZoneDevice : AbstractOpenRGBDevice<OpenRGBDeviceInfo>
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ using RGB.NET.Core;
|
||||
namespace RGB.NET.Devices.OpenRGB;
|
||||
|
||||
/// <inheritdoc />
|
||||
public class OpenRGBSegmentDevice : AbstractOpenRGBDevice<OpenRGBDeviceInfo>
|
||||
public sealed class OpenRGBSegmentDevice : AbstractOpenRGBDevice<OpenRGBDeviceInfo>
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ namespace RGB.NET.Devices.PicoPi;
|
||||
/// <remarks>
|
||||
/// Using this requires the libusb driver to be installed!
|
||||
/// </remarks>
|
||||
public class PicoPiBulkUpdateQueue : UpdateQueue
|
||||
public sealed class PicoPiBulkUpdateQueue : UpdateQueue
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@ namespace RGB.NET.Devices.PicoPi;
|
||||
/// <summary>
|
||||
/// Represents the update-queue performing updates for Pico-Pi HID-devices.
|
||||
/// </summary>
|
||||
public class PicoPiHIDUpdateQueue : UpdateQueue
|
||||
public sealed class PicoPiHIDUpdateQueue : UpdateQueue
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user