From 4dbeaf802a1e9dd95f90c93130e3ce47cb081cf0 Mon Sep 17 00:00:00 2001 From: Darth Affe Date: Sun, 1 Aug 2021 16:53:21 +0200 Subject: [PATCH] Fixed code issues --- RGB.NET.Core/Decorators/IDecoratable.cs | 2 +- RGB.NET.Core/Devices/AbstractRGBDevice.cs | 6 +++--- RGB.NET.Core/Devices/IRGBDevice.cs | 2 +- RGB.NET.Core/Extensions/RectangleExtensions.cs | 2 +- RGB.NET.Core/Groups/AbstractLedGroup.cs | 2 +- RGB.NET.Core/MVVM/AbstractBindable.cs | 4 ++-- RGB.NET.Core/Positioning/Rectangle.cs | 8 ++++---- RGB.NET.Core/RGB.NET.Core.csproj.DotSettings | 3 ++- RGB.NET.Core/RGBSurface.cs | 2 +- .../RGB.NET.Devices.Asus.csproj.DotSettings | 3 ++- .../RGB.NET.Devices.CoolerMaster.csproj.DotSettings | 3 ++- .../RGB.NET.Devices.Corsair.csproj.DotSettings | 3 ++- RGB.NET.Devices.DMX/E131/E131DMXDeviceDefinition.cs | 4 ++-- .../RGB.NET.Devices.DMX.csproj.DotSettings | 3 ++- .../RGB.NET.Devices.Logitech.csproj.DotSettings | 3 ++- .../RGB.NET.Devices.Msi.csproj.DotSettings | 3 ++- .../Launchpad/NovationLaunchpadRGBDeviceInfo.cs | 2 +- .../RGB.NET.Devices.Novation.csproj.DotSettings | 3 ++- .../RGB.NET.Devices.PicoPi.csproj.DotSettings | 3 ++- .../RGB.NET.Devices.Razer.csproj.DotSettings | 3 ++- .../RGB.NET.Devices.SteelSeries.csproj.DotSettings | 3 ++- .../RGB.NET.Devices.WS281X.csproj.DotSettings | 3 ++- RGB.NET.Presets/RGB.NET.Presets.csproj.DotSettings | 3 ++- RGB.NET.Presets/Textures/Gradients/AbstractGradient.cs | 4 ++-- RGB.NET.Presets/Textures/Gradients/LinearGradient.cs | 2 +- 25 files changed, 46 insertions(+), 33 deletions(-) diff --git a/RGB.NET.Core/Decorators/IDecoratable.cs b/RGB.NET.Core/Decorators/IDecoratable.cs index 781d9f1..2892638 100644 --- a/RGB.NET.Core/Decorators/IDecoratable.cs +++ b/RGB.NET.Core/Decorators/IDecoratable.cs @@ -13,7 +13,7 @@ namespace RGB.NET.Core /// /// Represents a basic decoratable for a specific type of /// - /// + /// The type of decorators this decoratable can be decorated with. public interface IDecoratable : IDecoratable where T : IDecorator { diff --git a/RGB.NET.Core/Devices/AbstractRGBDevice.cs b/RGB.NET.Core/Devices/AbstractRGBDevice.cs index f851f41..5f9e9bf 100644 --- a/RGB.NET.Core/Devices/AbstractRGBDevice.cs +++ b/RGB.NET.Core/Devices/AbstractRGBDevice.cs @@ -189,10 +189,10 @@ namespace RGB.NET.Core } /// - /// + /// Gets the custom data associated with the specified LED. /// - /// - /// + /// The id of the led. + /// The custom data for the specified LED. protected virtual object? GetLedCustomData(LedId ledId) => null; /// diff --git a/RGB.NET.Core/Devices/IRGBDevice.cs b/RGB.NET.Core/Devices/IRGBDevice.cs index 28c2dde..b058971 100644 --- a/RGB.NET.Core/Devices/IRGBDevice.cs +++ b/RGB.NET.Core/Devices/IRGBDevice.cs @@ -51,7 +51,7 @@ namespace RGB.NET.Core /// /// The to check. /// The minimal percentage overlay a must have with the to be taken into the list. - /// + /// A enumerable of leds inside the specified rectangle. IEnumerable this[Rectangle referenceRect, double minOverlayPercentage = 0.5] { get; } #endregion diff --git a/RGB.NET.Core/Extensions/RectangleExtensions.cs b/RGB.NET.Core/Extensions/RectangleExtensions.cs index 4b7104a..ea0dde7 100644 --- a/RGB.NET.Core/Extensions/RectangleExtensions.cs +++ b/RGB.NET.Core/Extensions/RectangleExtensions.cs @@ -75,7 +75,7 @@ namespace RGB.NET.Core /// Calculates the representing the intersection of this and the one provided as parameter. /// /// The rectangle to calculate the intersection for. - /// The intersecting + /// The intersecting . /// A new representing the intersection this and the one provided as parameter. public static Rectangle CalculateIntersection(this in Rectangle rect, in Rectangle intersectingRectangle) { diff --git a/RGB.NET.Core/Groups/AbstractLedGroup.cs b/RGB.NET.Core/Groups/AbstractLedGroup.cs index c42de03..514a680 100644 --- a/RGB.NET.Core/Groups/AbstractLedGroup.cs +++ b/RGB.NET.Core/Groups/AbstractLedGroup.cs @@ -42,7 +42,7 @@ namespace RGB.NET.Core /// /// Gets a enumerable containing all leds in this group. /// - /// + /// A enumerable containing all leds of this group. protected abstract IEnumerable GetLeds(); /// diff --git a/RGB.NET.Core/MVVM/AbstractBindable.cs b/RGB.NET.Core/MVVM/AbstractBindable.cs index 5d41f1c..92a3cd8 100644 --- a/RGB.NET.Core/MVVM/AbstractBindable.cs +++ b/RGB.NET.Core/MVVM/AbstractBindable.cs @@ -21,12 +21,12 @@ namespace RGB.NET.Core #region Methods /// - /// Checks if the property already matches the desirec value or needs to be updated. + /// Checks if the property already matches the desired value or needs to be updated. /// /// Type of the property. /// Reference to the backing-filed. /// Value to apply. - /// + /// true if the value needs to be updated; otherweise false. [MethodImpl(MethodImplOptions.AggressiveInlining)] protected virtual bool RequiresUpdate(ref T storage, T value) => !Equals(storage, value); diff --git a/RGB.NET.Core/Positioning/Rectangle.cs b/RGB.NET.Core/Positioning/Rectangle.cs index 466c312..36715a1 100644 --- a/RGB.NET.Core/Positioning/Rectangle.cs +++ b/RGB.NET.Core/Positioning/Rectangle.cs @@ -78,7 +78,7 @@ namespace RGB.NET.Core /// Initializes a new instance of the class using the specified array of . /// The and is calculated to completely contain all rectangles provided as parameters. /// - /// The array of used to calculate the and + /// The array of used to calculate the and . public Rectangle(params Rectangle[] rectangles) : this(rectangles.AsEnumerable()) { } @@ -87,7 +87,7 @@ namespace RGB.NET.Core /// Initializes a new instance of the class using the specified list of . /// The and is calculated to completely contain all rectangles provided as parameters. /// - /// The list of used to calculate the and + /// The list of used to calculate the and . public Rectangle(IEnumerable rectangles) { bool hasPoint = false; @@ -116,7 +116,7 @@ namespace RGB.NET.Core /// Initializes a new instance of the class using the specified array of . /// The and is calculated to contain all points provided as parameters. /// - /// The array of used to calculate the and + /// The array of used to calculate the and . public Rectangle(params Point[] points) : this(points.AsEnumerable()) { } @@ -126,7 +126,7 @@ namespace RGB.NET.Core /// Initializes a new instance of the class using the specified list of . /// The and is calculated to contain all points provided as parameters. /// - /// The list of used to calculate the and + /// The list of used to calculate the and . public Rectangle(IEnumerable points) : this() { diff --git a/RGB.NET.Core/RGB.NET.Core.csproj.DotSettings b/RGB.NET.Core/RGB.NET.Core.csproj.DotSettings index 9d38d8a..bf7655f 100644 --- a/RGB.NET.Core/RGB.NET.Core.csproj.DotSettings +++ b/RGB.NET.Core/RGB.NET.Core.csproj.DotSettings @@ -24,4 +24,5 @@ True True True - True \ No newline at end of file + True + \ No newline at end of file diff --git a/RGB.NET.Core/RGBSurface.cs b/RGB.NET.Core/RGBSurface.cs index 669c044..6b9d726 100644 --- a/RGB.NET.Core/RGBSurface.cs +++ b/RGB.NET.Core/RGBSurface.cs @@ -83,7 +83,7 @@ namespace RGB.NET.Core /// /// Represents the event-handler of the -event. /// - /// + /// The arguments provided by the event. public delegate void SurfaceLayoutChangedEventHandler(SurfaceLayoutChangedEventArgs args); #endregion diff --git a/RGB.NET.Devices.Asus/RGB.NET.Devices.Asus.csproj.DotSettings b/RGB.NET.Devices.Asus/RGB.NET.Devices.Asus.csproj.DotSettings index 942f886..e6bee89 100644 --- a/RGB.NET.Devices.Asus/RGB.NET.Devices.Asus.csproj.DotSettings +++ b/RGB.NET.Devices.Asus/RGB.NET.Devices.Asus.csproj.DotSettings @@ -8,4 +8,5 @@ True True True - True \ No newline at end of file + True + \ No newline at end of file diff --git a/RGB.NET.Devices.CoolerMaster/RGB.NET.Devices.CoolerMaster.csproj.DotSettings b/RGB.NET.Devices.CoolerMaster/RGB.NET.Devices.CoolerMaster.csproj.DotSettings index 44309b1..1590a7c 100644 --- a/RGB.NET.Devices.CoolerMaster/RGB.NET.Devices.CoolerMaster.csproj.DotSettings +++ b/RGB.NET.Devices.CoolerMaster/RGB.NET.Devices.CoolerMaster.csproj.DotSettings @@ -3,4 +3,5 @@ True True True - True \ No newline at end of file + True + \ No newline at end of file diff --git a/RGB.NET.Devices.Corsair/RGB.NET.Devices.Corsair.csproj.DotSettings b/RGB.NET.Devices.Corsair/RGB.NET.Devices.Corsair.csproj.DotSettings index 0501b9d..f37e8f8 100644 --- a/RGB.NET.Devices.Corsair/RGB.NET.Devices.Corsair.csproj.DotSettings +++ b/RGB.NET.Devices.Corsair/RGB.NET.Devices.Corsair.csproj.DotSettings @@ -17,4 +17,5 @@ True True True - True \ No newline at end of file + True + \ No newline at end of file diff --git a/RGB.NET.Devices.DMX/E131/E131DMXDeviceDefinition.cs b/RGB.NET.Devices.DMX/E131/E131DMXDeviceDefinition.cs index ca37238..f1e5f12 100644 --- a/RGB.NET.Devices.DMX/E131/E131DMXDeviceDefinition.cs +++ b/RGB.NET.Devices.DMX/E131/E131DMXDeviceDefinition.cs @@ -62,9 +62,9 @@ namespace RGB.NET.Devices.DMX.E131 #region Constructors /// - /// + /// Initializes a new instance of the class. /// - /// + /// The hostname of the device. public E131DMXDeviceDefinition(string hostname) { this.Hostname = hostname; diff --git a/RGB.NET.Devices.DMX/RGB.NET.Devices.DMX.csproj.DotSettings b/RGB.NET.Devices.DMX/RGB.NET.Devices.DMX.csproj.DotSettings index acc5fca..a54436d 100644 --- a/RGB.NET.Devices.DMX/RGB.NET.Devices.DMX.csproj.DotSettings +++ b/RGB.NET.Devices.DMX/RGB.NET.Devices.DMX.csproj.DotSettings @@ -1,2 +1,3 @@  - True \ No newline at end of file + True + \ No newline at end of file diff --git a/RGB.NET.Devices.Logitech/RGB.NET.Devices.Logitech.csproj.DotSettings b/RGB.NET.Devices.Logitech/RGB.NET.Devices.Logitech.csproj.DotSettings index e94069e..cb84f1e 100644 --- a/RGB.NET.Devices.Logitech/RGB.NET.Devices.Logitech.csproj.DotSettings +++ b/RGB.NET.Devices.Logitech/RGB.NET.Devices.Logitech.csproj.DotSettings @@ -6,4 +6,5 @@ True True True - True \ No newline at end of file + True + \ No newline at end of file diff --git a/RGB.NET.Devices.Msi/RGB.NET.Devices.Msi.csproj.DotSettings b/RGB.NET.Devices.Msi/RGB.NET.Devices.Msi.csproj.DotSettings index bec0f75..d0b9b63 100644 --- a/RGB.NET.Devices.Msi/RGB.NET.Devices.Msi.csproj.DotSettings +++ b/RGB.NET.Devices.Msi/RGB.NET.Devices.Msi.csproj.DotSettings @@ -3,4 +3,5 @@ True True True - True \ No newline at end of file + True + \ No newline at end of file diff --git a/RGB.NET.Devices.Novation/Launchpad/NovationLaunchpadRGBDeviceInfo.cs b/RGB.NET.Devices.Novation/Launchpad/NovationLaunchpadRGBDeviceInfo.cs index f1d73d1..6d06b06 100644 --- a/RGB.NET.Devices.Novation/Launchpad/NovationLaunchpadRGBDeviceInfo.cs +++ b/RGB.NET.Devices.Novation/Launchpad/NovationLaunchpadRGBDeviceInfo.cs @@ -21,7 +21,7 @@ namespace RGB.NET.Devices.Novation /// Internal constructor of managed . /// /// The represented device model. - /// + /// The id of the device. /// The of the . /// A mapping of leds this device is initialized with. internal NovationLaunchpadRGBDeviceInfo(string model, int deviceId, NovationColorCapabilities colorCapabilities, LedIdMappings ledMapping) diff --git a/RGB.NET.Devices.Novation/RGB.NET.Devices.Novation.csproj.DotSettings b/RGB.NET.Devices.Novation/RGB.NET.Devices.Novation.csproj.DotSettings index b5910ca..a290ae5 100644 --- a/RGB.NET.Devices.Novation/RGB.NET.Devices.Novation.csproj.DotSettings +++ b/RGB.NET.Devices.Novation/RGB.NET.Devices.Novation.csproj.DotSettings @@ -2,4 +2,5 @@ True True True - True \ No newline at end of file + True + \ No newline at end of file diff --git a/RGB.NET.Devices.PicoPi/RGB.NET.Devices.PicoPi.csproj.DotSettings b/RGB.NET.Devices.PicoPi/RGB.NET.Devices.PicoPi.csproj.DotSettings index 2f92998..22c2a5d 100644 --- a/RGB.NET.Devices.PicoPi/RGB.NET.Devices.PicoPi.csproj.DotSettings +++ b/RGB.NET.Devices.PicoPi/RGB.NET.Devices.PicoPi.csproj.DotSettings @@ -1,2 +1,3 @@  - True \ No newline at end of file + True + \ No newline at end of file diff --git a/RGB.NET.Devices.Razer/RGB.NET.Devices.Razer.csproj.DotSettings b/RGB.NET.Devices.Razer/RGB.NET.Devices.Razer.csproj.DotSettings index 1e5aa14..323fe52 100644 --- a/RGB.NET.Devices.Razer/RGB.NET.Devices.Razer.csproj.DotSettings +++ b/RGB.NET.Devices.Razer/RGB.NET.Devices.Razer.csproj.DotSettings @@ -8,4 +8,5 @@ True True True - True \ No newline at end of file + True + \ No newline at end of file diff --git a/RGB.NET.Devices.SteelSeries/RGB.NET.Devices.SteelSeries.csproj.DotSettings b/RGB.NET.Devices.SteelSeries/RGB.NET.Devices.SteelSeries.csproj.DotSettings index 20d4792..a98175d 100644 --- a/RGB.NET.Devices.SteelSeries/RGB.NET.Devices.SteelSeries.csproj.DotSettings +++ b/RGB.NET.Devices.SteelSeries/RGB.NET.Devices.SteelSeries.csproj.DotSettings @@ -1,4 +1,5 @@  True True - True \ No newline at end of file + True + \ No newline at end of file diff --git a/RGB.NET.Devices.WS281X/RGB.NET.Devices.WS281X.csproj.DotSettings b/RGB.NET.Devices.WS281X/RGB.NET.Devices.WS281X.csproj.DotSettings index acc5fca..a54436d 100644 --- a/RGB.NET.Devices.WS281X/RGB.NET.Devices.WS281X.csproj.DotSettings +++ b/RGB.NET.Devices.WS281X/RGB.NET.Devices.WS281X.csproj.DotSettings @@ -1,2 +1,3 @@  - True \ No newline at end of file + True + \ No newline at end of file diff --git a/RGB.NET.Presets/RGB.NET.Presets.csproj.DotSettings b/RGB.NET.Presets/RGB.NET.Presets.csproj.DotSettings index 3af07cd..9b6455c 100644 --- a/RGB.NET.Presets/RGB.NET.Presets.csproj.DotSettings +++ b/RGB.NET.Presets/RGB.NET.Presets.csproj.DotSettings @@ -2,4 +2,5 @@ False False True - True \ No newline at end of file + True + \ No newline at end of file diff --git a/RGB.NET.Presets/Textures/Gradients/AbstractGradient.cs b/RGB.NET.Presets/Textures/Gradients/AbstractGradient.cs index e52788c..7085d5c 100644 --- a/RGB.NET.Presets/Textures/Gradients/AbstractGradient.cs +++ b/RGB.NET.Presets/Textures/Gradients/AbstractGradient.cs @@ -94,8 +94,8 @@ namespace RGB.NET.Presets.Textures.Gradients /// /// Clips the offset and ensures, that it is inside the bounds of the stop list. /// - /// - /// + /// The offset to clip. + /// The clipped offset. protected float ClipOffset(float offset) { float max = GradientStops.Max(stop => stop.Offset); diff --git a/RGB.NET.Presets/Textures/Gradients/LinearGradient.cs b/RGB.NET.Presets/Textures/Gradients/LinearGradient.cs index 9c27d08..fa13f43 100644 --- a/RGB.NET.Presets/Textures/Gradients/LinearGradient.cs +++ b/RGB.NET.Presets/Textures/Gradients/LinearGradient.cs @@ -111,7 +111,7 @@ namespace RGB.NET.Presets.Textures.Gradients /// The reference offset. /// The ordered list of to choose from. /// Bool indicating if the gradient should be wrapped or not. - /// + /// The two s encapsulating the specified offset. protected virtual (GradientStop gsBefore, GradientStop gsAfter) GetEnclosingGradientStops(float offset, LinkedList orderedStops, bool wrap) { LinkedList gradientStops = new(orderedStops);