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

This commit is contained in:
DarthAffe committed 2023-04-19 21:19:05 +02:00
1 parent d9c244a044
commit 2020992249
155 files changed
+205 -344

No files matched your search

@@ -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