diff --git a/Brushes/AbstractBrush.cs b/Brushes/AbstractBrush.cs
index 5a43138..9b7d429 100644
--- a/Brushes/AbstractBrush.cs
+++ b/Brushes/AbstractBrush.cs
@@ -36,9 +36,9 @@ namespace CUE.NET.Brushes
public float Opacity { get; set; }
///
- /// Gets a list of color-corrections used to correct the colors of the brush.
+ /// Gets a list of used to correct the colors of the brush.
///
- public List ColorCorrections { get; } = new List();
+ public IList ColorCorrections { get; } = new List();
///
/// Gets the Rectangle used in the last render pass.
diff --git a/Brushes/IBrush.cs b/Brushes/IBrush.cs
index 0e00dab..939d674 100644
--- a/Brushes/IBrush.cs
+++ b/Brushes/IBrush.cs
@@ -1,5 +1,6 @@
// ReSharper disable UnusedMemberInSuper.Global
// ReSharper disable UnusedMember.Global
+// ReSharper disable ReturnTypeCanBeEnumerable.Global
using System.Collections.Generic;
using System.Drawing;
@@ -33,7 +34,7 @@ namespace CUE.NET.Brushes
///
/// Gets a list of color-corrections used to correct the colors of the brush.
///
- List ColorCorrections { get; }
+ IList ColorCorrections { get; }
///
/// Gets the Rectangle used in the last render pass.
diff --git a/Brushes/IGradientBRush.cs b/Brushes/IGradientBRush.cs
index e2839b7..e3430fa 100644
--- a/Brushes/IGradientBRush.cs
+++ b/Brushes/IGradientBRush.cs
@@ -2,8 +2,14 @@
namespace CUE.NET.Brushes
{
+ ///
+ /// Represents a basic gradient-brush.
+ ///
public interface IGradientBrush : IBrush
{
+ ///
+ /// Gets the gradient used by this .
+ ///
IGradient Gradient { get; }
}
}
diff --git a/Brushes/SolidColorBrush.cs b/Brushes/SolidColorBrush.cs
index 2881477..d373e60 100644
--- a/Brushes/SolidColorBrush.cs
+++ b/Brushes/SolidColorBrush.cs
@@ -50,21 +50,37 @@ namespace CUE.NET.Brushes
#region Operators
+ ///
+ /// Converts a to a .
+ ///
+ /// The to convert.
public static explicit operator SolidColorBrush(Color color)
{
return new SolidColorBrush(color);
}
+ ///
+ /// Converts a to a .
+ ///
+ /// The to convert.
public static implicit operator Color(SolidColorBrush brush)
{
return brush.Color;
}
+ ///
+ /// Converts a to a .
+ ///
+ /// The to convert.
public static explicit operator SolidColorBrush(CorsairColor color)
{
return new SolidColorBrush(color);
}
+ ///
+ /// Converts a to a .
+ ///
+ /// The to convert.
public static implicit operator CorsairColor(SolidColorBrush brush)
{
return brush.Color;
diff --git a/ColorCorrection/GammaCorrection.cs b/ColorCorrection/GammaCorrection.cs
index 153ed6a..807d64c 100644
--- a/ColorCorrection/GammaCorrection.cs
+++ b/ColorCorrection/GammaCorrection.cs
@@ -1,4 +1,8 @@
-using System;
+// ReSharper disable AutoPropertyCanBeMadeGetOnly.Global
+// ReSharper disable MemberCanBePrivate.Global
+// ReSharper disable UnusedMember.Global
+
+using System;
using CUE.NET.Devices.Generic;
using CUE.NET.Helper;
diff --git a/CueSDK.cs b/CueSDK.cs
index 59a9375..d9d5091 100644
--- a/CueSDK.cs
+++ b/CueSDK.cs
@@ -16,6 +16,9 @@ using CUE.NET.Native;
namespace CUE.NET
{
+ ///
+ /// Static entry point to work with the Corsair-SDK.
+ ///
public static partial class CueSDK
{
#region Properties & Fields
@@ -91,6 +94,7 @@ namespace CUE.NET
{
try
{
+ // ReSharper disable once RedundantIfElseBlock
if (IsInitialized)
{
// ReSharper disable once SwitchStatementMissingSomeCases - everything else is true
diff --git a/CueSDKAutoUpdate.cs b/CueSDKAutoUpdate.cs
index 953cdf3..19d8f58 100644
--- a/CueSDKAutoUpdate.cs
+++ b/CueSDKAutoUpdate.cs
@@ -9,6 +9,9 @@ using CUE.NET.Devices.Generic.Enums;
namespace CUE.NET
{
+ ///
+ /// Static entry point to work with the Corsair-SDK.
+ ///
public static partial class CueSDK
{
#region Properties & Fields
diff --git a/Devices/Generic/AbstractCueDevice.cs b/Devices/Generic/AbstractCueDevice.cs
index 6265ef1..5cfed12 100644
--- a/Devices/Generic/AbstractCueDevice.cs
+++ b/Devices/Generic/AbstractCueDevice.cs
@@ -396,7 +396,7 @@ namespace CUE.NET.Devices.Generic
{
long lastUpdateTicks = _lastUpdate.Ticks;
_lastUpdate = DateTime.Now;
- Updating?.Invoke(this, new UpdatingEventArgs((float)((DateTime.Now.Ticks - lastUpdateTicks) / 10000000f)));
+ Updating?.Invoke(this, new UpdatingEventArgs((DateTime.Now.Ticks - lastUpdateTicks) / 10000000f));
}
catch
{
diff --git a/Devices/Generic/CorsairColor.cs b/Devices/Generic/CorsairColor.cs
index 346cdc5..94719f0 100644
--- a/Devices/Generic/CorsairColor.cs
+++ b/Devices/Generic/CorsairColor.cs
@@ -2,35 +2,77 @@
// ReSharper disable AutoPropertyCanBeMadeGetOnly.Global
// ReSharper disable UnusedMember.Global
+using System.Diagnostics;
using System.Drawing;
namespace CUE.NET.Devices.Generic
{
+ ///
+ /// Represents an ARGB (alpha, red, green, blue) color used by CUE.NET.
+ ///
+ [DebuggerDisplay("[A: {A}, R: {R}, G: {G}, B: {B}]")]
public class CorsairColor
{
#region Constants
+ ///
+ /// Gets an transparent color [A: 0, R: 0, G: 0, B: 0]
+ ///
public static CorsairColor Transparent => Color.Transparent;
#endregion
#region Properties & Fields
+ ///
+ /// Gets or sets the alpha component value of this .
+ ///
public byte A { get; set; }
+
+ ///
+ /// Gets or sets the red component value of this .
+ ///
public byte R { get; set; }
+
+ ///
+ /// Gets or sets the green component value of this .
+ ///
public byte G { get; set; }
+
+ ///
+ /// Gets or sets the blue component value of this .
+ ///
public byte B { get; set; }
#endregion
#region Constructors
+ ///
+ /// Initializes a new instance of the class.
+ /// The class created by this constructor equals .
+ ///
public CorsairColor()
{ }
- public CorsairColor(byte r, byte g, byte b) : this(255, r, g, b)
+ ///
+ /// Initializes a new instance of the class using only RGB-Values.
+ /// Alpha defaults to 255.
+ ///
+ /// The red component value of this .
+ /// The green component value of this .
+ /// The blue component value of this .
+ public CorsairColor(byte r, byte g, byte b)
+ : this(255, r, g, b)
{ }
+ ///
+ /// Initializes a new instance of the class using ARGB-values.
+ ///
+ /// The alpha component value of this .
+ /// The red component value of this .
+ /// The green component value of this .
+ /// The blue component value of this .
public CorsairColor(byte a, byte r, byte g, byte b)
{
this.A = a;
@@ -39,6 +81,10 @@ namespace CUE.NET.Devices.Generic
this.B = b;
}
+ ///
+ /// Initializes a new instance of the class by cloning a existing .
+ ///
+ /// The the values are copied from.
public CorsairColor(CorsairColor color)
: this(color.A, color.R, color.G, color.B)
{ }
@@ -47,11 +93,19 @@ namespace CUE.NET.Devices.Generic
#region Operators
+ ///
+ /// Converts the individual byte-values of this to a human-readable string.
+ ///
+ /// A string that contains the individual byte-values of this . For example "[A: 255, R: 255, G: 0, B: 0]".
public override string ToString()
{
return $"[A: {A}, R: {R}, G: {G}, B: {B}]";
}
-
+ ///
+ /// Tests whether the specified object is a and is equivalent to this .
+ ///
+ /// The object to test.
+ /// true if is a equivalent to this ; otherwise, false.
public override bool Equals(object obj)
{
CorsairColor compareColor = obj as CorsairColor;
@@ -67,6 +121,10 @@ namespace CUE.NET.Devices.Generic
return (compareColor.A == A) && (compareColor.R == R) && (compareColor.G == G) && (compareColor.B == B);
}
+ ///
+ /// Returns a hash code for this .
+ ///
+ /// An integer value that specifies the hash code for this .
public override int GetHashCode()
{
unchecked
@@ -79,20 +137,41 @@ namespace CUE.NET.Devices.Generic
}
}
+ ///
+ /// Returns a value that indicates whether two specified are equal.
+ ///
+ /// The first color to compare.
+ /// The second color to compare.
+ /// true if and are equal; otherwise, false.
public static bool operator ==(CorsairColor color1, CorsairColor color2)
{
return ReferenceEquals(color1, null) ? ReferenceEquals(color2, null) : color1.Equals(color2);
}
+
+ ///
+ /// Returns a value that indicates whether two specified are equal.
+ ///
+ /// The first color to compare.
+ /// The second color to compare.
+ /// true if and are not equal; otherwise, false.
public static bool operator !=(CorsairColor color1, CorsairColor color2)
{
return !(color1 == color2);
}
+ ///
+ /// Converts a to a .
+ ///
+ /// The to convert.
public static implicit operator CorsairColor(Color color)
{
return new CorsairColor(color.A, color.R, color.G, color.B);
}
+ ///
+ /// Converts a to a .
+ ///
+ /// The to convert.
public static implicit operator Color(CorsairColor color)
{
return Color.FromArgb(color.A, color.R, color.G, color.B);
diff --git a/Devices/Generic/CorsairLed.cs b/Devices/Generic/CorsairLed.cs
index 29a9630..32b8762 100644
--- a/Devices/Generic/CorsairLed.cs
+++ b/Devices/Generic/CorsairLed.cs
@@ -2,6 +2,7 @@
// ReSharper disable UnusedAutoPropertyAccessor.Global
// ReSharper disable AutoPropertyCanBeMadeGetOnly.Global
+using System.Diagnostics;
using System.Drawing;
using CUE.NET.Devices.Generic.Enums;
using CUE.NET.Helper;
@@ -11,10 +12,11 @@ namespace CUE.NET.Devices.Generic
///
/// Represents a single LED of a CUE-device.
///
+ [DebuggerDisplay("{Id} {Color}")]
public class CorsairLed
{
#region Properties & Fields
-
+
///
/// Gets the key-ID of the Led.
///
@@ -52,7 +54,7 @@ namespace CUE.NET.Devices.Generic
///
/// Gets or sets if the color of this LED can be changed.
///
- public bool IsLocked { get; set; } = false;
+ public bool IsLocked { get; set; }
#endregion
@@ -73,6 +75,15 @@ namespace CUE.NET.Devices.Generic
#region Methods
+ ///
+ /// Converts the Id and the of this to a human-readable string.
+ ///
+ /// A string that contains the Id and the of this . For example "Enter [A: 255, R: 255, G: 0, B: 0]".
+ public override string ToString()
+ {
+ return $"{Id} {Color}";
+ }
+
///
/// Updates the LED to the requested color.
///
@@ -92,5 +103,27 @@ namespace CUE.NET.Devices.Generic
}
#endregion
+
+ #region Operators
+
+ ///
+ /// Converts a to a .
+ ///
+ /// The to convert.
+ public static implicit operator CorsairLedId(CorsairLed led)
+ {
+ return led?.Id ?? CorsairLedId.Invalid;
+ }
+
+ ///
+ /// Converts a to a .
+ ///
+ /// The to convert.
+ public static implicit operator CorsairColor(CorsairLed led)
+ {
+ return led?.Color;
+ }
+
+ #endregion
}
}
diff --git a/Devices/Generic/Enums/CorsairAccessMode.cs b/Devices/Generic/Enums/CorsairAccessMode.cs
index bf61975..d627ec7 100644
--- a/Devices/Generic/Enums/CorsairAccessMode.cs
+++ b/Devices/Generic/Enums/CorsairAccessMode.cs
@@ -1,6 +1,8 @@
// ReSharper disable InconsistentNaming
// ReSharper disable UnusedMember.Global
+#pragma warning disable 1591 // Missing XML comment for publicly visible type or member
+
namespace CUE.NET.Devices.Generic.Enums
{
///
diff --git a/Devices/Generic/Enums/CorsairDeviceType.cs b/Devices/Generic/Enums/CorsairDeviceType.cs
index 0e31b63..adcac29 100644
--- a/Devices/Generic/Enums/CorsairDeviceType.cs
+++ b/Devices/Generic/Enums/CorsairDeviceType.cs
@@ -1,6 +1,8 @@
// ReSharper disable InconsistentNaming
// ReSharper disable UnusedMember.Global
+#pragma warning disable 1591 // Missing XML comment for publicly visible type or member
+
namespace CUE.NET.Devices.Generic.Enums
{
///
@@ -8,6 +10,7 @@ namespace CUE.NET.Devices.Generic.Enums
///
public enum CorsairDeviceType
{
+
Unknown = 0,
Mouse = 1,
Keyboard = 2,
diff --git a/Devices/Generic/Enums/CorsairLedId.cs b/Devices/Generic/Enums/CorsairLedId.cs
index 9db5ac4..9e267fc 100644
--- a/Devices/Generic/Enums/CorsairLedId.cs
+++ b/Devices/Generic/Enums/CorsairLedId.cs
@@ -1,5 +1,7 @@
// ReSharper disable InconsistentNaming
+#pragma warning disable 1591 // Missing XML comment for publicly visible type or member
+
namespace CUE.NET.Devices.Generic.Enums
{
///
diff --git a/Devices/Generic/EventArgs/ExceptionEventArgs.cs b/Devices/Generic/EventArgs/ExceptionEventArgs.cs
index 50f15e9..818e46d 100644
--- a/Devices/Generic/EventArgs/ExceptionEventArgs.cs
+++ b/Devices/Generic/EventArgs/ExceptionEventArgs.cs
@@ -6,7 +6,7 @@ using System;
namespace CUE.NET.Devices.Generic.EventArgs
{
///
- /// Represents the information supplied with an Exception-event.
+ /// Represents the information supplied with an -event.
///
public class ExceptionEventArgs : System.EventArgs
{
diff --git a/Devices/Generic/EventArgs/LedsUpdatedEventArgs.cs b/Devices/Generic/EventArgs/LedsUpdatedEventArgs.cs
index a4a0e77..ad203c2 100644
--- a/Devices/Generic/EventArgs/LedsUpdatedEventArgs.cs
+++ b/Devices/Generic/EventArgs/LedsUpdatedEventArgs.cs
@@ -5,16 +5,26 @@ using System.Collections.Generic;
namespace CUE.NET.Devices.Generic.EventArgs
{
+ ///
+ /// Represents the information supplied with an -event.
+ ///
public class LedsUpdatedEventArgs : System.EventArgs
{
#region Properties & Fields
+ ///
+ /// Gets a list of from the updated leds.
+ ///
public IEnumerable UpdatedLeds { get; }
#endregion
#region Constructors
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The updated leds.
public LedsUpdatedEventArgs(IEnumerable updatedLeds)
{
this.UpdatedLeds = updatedLeds;
diff --git a/Devices/Generic/EventArgs/LedsUpdatingEventArgs.cs b/Devices/Generic/EventArgs/LedsUpdatingEventArgs.cs
index 708a8a7..e7d68c7 100644
--- a/Devices/Generic/EventArgs/LedsUpdatingEventArgs.cs
+++ b/Devices/Generic/EventArgs/LedsUpdatingEventArgs.cs
@@ -5,16 +5,26 @@ using System.Collections.Generic;
namespace CUE.NET.Devices.Generic.EventArgs
{
+ ///
+ /// Represents the information supplied with an -event.
+ ///
public class LedsUpdatingEventArgs : System.EventArgs
{
#region Properties & Fields
+ ///
+ /// Gets a list of from the updating leds.
+ ///
public ICollection UpdatingLeds { get; }
#endregion
#region Constructors
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The updating leds.
public LedsUpdatingEventArgs(ICollection updatingLeds)
{
this.UpdatingLeds = updatingLeds;
diff --git a/Devices/Generic/EventArgs/UpdatedEventArgs.cs b/Devices/Generic/EventArgs/UpdatedEventArgs.cs
index a2b2d4b..f56c333 100644
--- a/Devices/Generic/EventArgs/UpdatedEventArgs.cs
+++ b/Devices/Generic/EventArgs/UpdatedEventArgs.cs
@@ -1,5 +1,8 @@
namespace CUE.NET.Devices.Generic.EventArgs
{
+ ///
+ /// Represents the information supplied with an -event.
+ ///
public class UpdatedEventArgs : System.EventArgs
{ }
}
diff --git a/Devices/Generic/EventArgs/UpdatingEventArgs.cs b/Devices/Generic/EventArgs/UpdatingEventArgs.cs
index 99a8ca6..c124dcc 100644
--- a/Devices/Generic/EventArgs/UpdatingEventArgs.cs
+++ b/Devices/Generic/EventArgs/UpdatingEventArgs.cs
@@ -3,16 +3,26 @@
namespace CUE.NET.Devices.Generic.EventArgs
{
+ ///
+ /// Represents the information supplied with an -event.
+ ///
public class UpdatingEventArgs : System.EventArgs
{
#region Properties & Fields
+ ///
+ /// Gets the elapsed time (in seconds) sonce the last update.
+ ///
public float DeltaTime { get; }
#endregion
#region Constructors
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The elapsed time (in seconds) sonce the last update.
public UpdatingEventArgs(float deltaTime)
{
this.DeltaTime = deltaTime;
diff --git a/Devices/Headset/Enums/CorsairHeadsetLedId.cs b/Devices/Headset/Enums/CorsairHeadsetLedId.cs
index 49b810c..09e9c54 100644
--- a/Devices/Headset/Enums/CorsairHeadsetLedId.cs
+++ b/Devices/Headset/Enums/CorsairHeadsetLedId.cs
@@ -1,6 +1,8 @@
// ReSharper disable UnusedMember.Global
// ReSharper disable InconsistentNaming
+#pragma warning disable 1591 // Missing XML comment for publicly visible type or member
+
using CUE.NET.Devices.Generic.Enums;
namespace CUE.NET.Devices.Headset.Enums
diff --git a/Devices/Keyboard/Enums/CorsairKeyboardLedId.cs b/Devices/Keyboard/Enums/CorsairKeyboardLedId.cs
index 10b13bb..7055201 100644
--- a/Devices/Keyboard/Enums/CorsairKeyboardLedId.cs
+++ b/Devices/Keyboard/Enums/CorsairKeyboardLedId.cs
@@ -1,6 +1,8 @@
// ReSharper disable UnusedMember.Global
// ReSharper disable InconsistentNaming
+#pragma warning disable 1591 // Missing XML comment for publicly visible type or member
+
using CUE.NET.Devices.Generic.Enums;
namespace CUE.NET.Devices.Keyboard.Enums
diff --git a/Devices/Keyboard/Enums/CorsairLogicalKeyboardLayout.cs b/Devices/Keyboard/Enums/CorsairLogicalKeyboardLayout.cs
index 17577fd..8ec11a6 100644
--- a/Devices/Keyboard/Enums/CorsairLogicalKeyboardLayout.cs
+++ b/Devices/Keyboard/Enums/CorsairLogicalKeyboardLayout.cs
@@ -1,6 +1,8 @@
// ReSharper disable InconsistentNaming
// ReSharper disable UnusedMember.Global
+#pragma warning disable 1591 // Missing XML comment for publicly visible type or member
+
namespace CUE.NET.Devices.Keyboard.Enums
{
///
diff --git a/Devices/Mouse/Enums/CorsairMouseLedId.cs b/Devices/Mouse/Enums/CorsairMouseLedId.cs
index 8f35b88..6f6f846 100644
--- a/Devices/Mouse/Enums/CorsairMouseLedId.cs
+++ b/Devices/Mouse/Enums/CorsairMouseLedId.cs
@@ -1,6 +1,8 @@
// ReSharper disable UnusedMember.Global
// ReSharper disable InconsistentNaming
+#pragma warning disable 1591 // Missing XML comment for publicly visible type or member
+
using CUE.NET.Devices.Generic.Enums;
namespace CUE.NET.Devices.Mouse.Enums
diff --git a/Devices/Mousemat/Enums/CorsairMousematLedId.cs b/Devices/Mousemat/Enums/CorsairMousematLedId.cs
index 2ec6c99..2507484 100644
--- a/Devices/Mousemat/Enums/CorsairMousematLedId.cs
+++ b/Devices/Mousemat/Enums/CorsairMousematLedId.cs
@@ -1,6 +1,8 @@
// ReSharper disable UnusedMember.Global
// ReSharper disable InconsistentNaming
+#pragma warning disable 1591 // Missing XML comment for publicly visible type or member
+
using CUE.NET.Devices.Generic.Enums;
namespace CUE.NET.Devices.Mousemat.Enums
diff --git a/Effects/FlashEffect.cs b/Effects/FlashEffect.cs
index da21172..343f201 100644
--- a/Effects/FlashEffect.cs
+++ b/Effects/FlashEffect.cs
@@ -76,6 +76,7 @@ namespace CUE.NET.Effects
_currentPhaseValue -= deltaTime;
// Using ifs instead of a switch allows to skip phases with time 0.
+ // ReSharper disable InvertIf
if (_currentPhase == ADSRPhase.Attack)
if (_currentPhaseValue > 0f)
@@ -123,6 +124,8 @@ namespace CUE.NET.Effects
_currentPhaseValue = Attack;
_currentPhase = ADSRPhase.Attack;
}
+
+ // ReSharper restore InvertIf
}
///
diff --git a/Effects/MoveGradientEffect.cs b/Effects/MoveGradientEffect.cs
index 85f81e5..6b720d5 100644
--- a/Effects/MoveGradientEffect.cs
+++ b/Effects/MoveGradientEffect.cs
@@ -9,6 +9,8 @@ namespace CUE.NET.Effects
public class MoveGradientEffect : AbstractBrushEffect
{
#region Properties & Fields
+ // ReSharper disable AutoPropertyCanBeMadeGetOnly.Global
+ // ReSharper disable MemberCanBePrivate.Global
///
/// Gets or sets the direction the gradient is moved.
@@ -24,6 +26,8 @@ namespace CUE.NET.Effects
///
public float Speed { get; set; }
+ // ReSharper restore MemberCanBePrivate.Global
+ // ReSharper restore AutoPropertyCanBeMadeGetOnly.Global
#endregion
#region Constructors
@@ -53,6 +57,7 @@ namespace CUE.NET.Effects
if (!Direction)
movement = -movement;
+ // ReSharper disable once CanBeReplacedWithTryCastAndCheckForNull
if (Brush.Gradient is LinearGradient)
{
LinearGradient linearGradient = (LinearGradient)Brush.Gradient;
diff --git a/Examples/Ambilight/Example_Ambilight_full/TakeAsIs/AmbilightSettings.cs b/Examples/Ambilight/Example_Ambilight_full/TakeAsIs/AmbilightSettings.cs
index 0108d96..0b768b3 100644
--- a/Examples/Ambilight/Example_Ambilight_full/TakeAsIs/AmbilightSettings.cs
+++ b/Examples/Ambilight/Example_Ambilight_full/TakeAsIs/AmbilightSettings.cs
@@ -14,6 +14,7 @@ namespace Example_Ambilight_full.TakeAsIs
get { return _ambienceCreatorType; }
set
{
+ // ReSharper disable once InvertIf
if (_ambienceCreatorType != value)
{
_ambienceCreatorType = value;
diff --git a/Gradients/AbstractGradient.cs b/Gradients/AbstractGradient.cs
index c399a80..2af00bf 100644
--- a/Gradients/AbstractGradient.cs
+++ b/Gradients/AbstractGradient.cs
@@ -76,10 +76,7 @@ namespace CUE.NET.Gradients
return max;
float min = GradientStops.Min(n => n.Offset);
- if (offset < min)
- return min;
-
- return offset;
+ return offset < min ? min : offset;
}
///
diff --git a/Groups/Extensions/LedGroupExtension.cs b/Groups/Extensions/LedGroupExtension.cs
index 3e2cf03..4077a6f 100644
--- a/Groups/Extensions/LedGroupExtension.cs
+++ b/Groups/Extensions/LedGroupExtension.cs
@@ -19,6 +19,7 @@ namespace CUE.NET.Groups.Extensions
public static ListLedGroup ToListLedGroup(this AbstractLedGroup ledGroup)
{
ListLedGroup listLedGroup = ledGroup as ListLedGroup;
+ // ReSharper disable once InvertIf
if (listLedGroup == null)
{
bool wasAttached = ledGroup.Detach();
diff --git a/Groups/ILedGroup.cs b/Groups/ILedGroup.cs
index 7b483c5..6842aad 100644
--- a/Groups/ILedGroup.cs
+++ b/Groups/ILedGroup.cs
@@ -8,6 +8,9 @@ using CUE.NET.Effects;
namespace CUE.NET.Groups
{
+ ///
+ /// Represents a basic led-group.
+ ///
public interface ILedGroup : IEffectTarget
{
///
diff --git a/Helper/ColorHelper.cs b/Helper/ColorHelper.cs
index daf06f1..08b72cd 100644
--- a/Helper/ColorHelper.cs
+++ b/Helper/ColorHelper.cs
@@ -1,7 +1,6 @@
// ReSharper disable MemberCanBePrivate.Global
using System;
-using CUE.NET.ColorCorrection;
using CUE.NET.Devices.Generic;
namespace CUE.NET.Helper
@@ -90,6 +89,7 @@ namespace CUE.NET.Helper
/// The resulting color.
public static CorsairColor Blend(this CorsairColor bg, CorsairColor fg)
{
+ // ReSharper disable once ConvertIfStatementToSwitchStatement
if (fg.A == 255)
return fg;
@@ -120,7 +120,7 @@ namespace CUE.NET.Helper
float min = Math.Min(Math.Min(color.R, color.G), color.B);
float max = Math.Max(Math.Max(color.R, color.G), color.B);
- float hue = 0f;
+ float hue;
if (Math.Abs(max - color.R) < float.Epsilon) // r is max
hue = (color.G - color.B) / (max - min);
else if (Math.Abs(max - color.G) < float.Epsilon) // g is max
diff --git a/Profiles/CueProfiles.cs b/Profiles/CueProfiles.cs
index b04e4c3..a244b7c 100644
--- a/Profiles/CueProfiles.cs
+++ b/Profiles/CueProfiles.cs
@@ -63,6 +63,7 @@ namespace CUE.NET.Profiles
public static CueProfile LoadProfileByName(string name = null)
{
string id = null;
+ // ReSharper disable once InvertIf
if (name != null && !_profileNameMapping.TryGetValue(name, out id))
{
LoadProfileNames(); // Reload and try again