Improved color-calculation of novation devices

This commit is contained in:
DarthAffe committed 2017-08-16 20:36:43 +02:00
1 parent 5440f9844f
commit 3a9d8e2e6d
9 files changed
+134 -40

No files matched your search

@@ -16,6 +16,13 @@ namespace RGB.NET.Devices.Novation
/// <returns>The value of the <see cref="DeviceIdAttribute"/> of the source.</returns>
internal static string GetDeviceId(this Enum source) => source.GetAttribute<DeviceIdAttribute>()?.Id;
/// <summary>
/// Gets the value of the <see cref="ColorCapabilityAttribute"/>.
/// </summary>
/// <param name="source">The enum value to get the description from.</param>
/// <returns>The value of the <see cref="ColorCapabilityAttribute"/> of the source.</returns>
internal static NovationColorCapabilities GetColorCapability(this Enum source) => source.GetAttribute<ColorCapabilityAttribute>()?.Capability ?? NovationColorCapabilities.None;
/// <summary>
/// Gets the attribute of type T.
/// </summary>