Changed all namespaces to file-scope

This commit is contained in:
DarthAffe committed 2021-11-13 17:35:08 +01:00
1 parent a0c6ccebea
commit 30624035f1
353 files changed
+35775 -36129

No files matched your search

@@ -1,13 +1,12 @@
using System.Collections.Generic;
using System.Linq;
namespace RGB.NET.Devices.Corsair
namespace RGB.NET.Devices.Corsair;
internal static class DictionaryExtension
{
internal static class DictionaryExtension
{
public static Dictionary<TValue, TKey> SwapKeyValue<TKey, TValue>(this Dictionary<TKey, TValue> dictionary)
where TKey : notnull
where TValue : notnull
public static Dictionary<TValue, TKey> SwapKeyValue<TKey, TValue>(this Dictionary<TKey, TValue> dictionary)
where TKey : notnull
where TValue : notnull
=> dictionary.ToDictionary(x => x.Value, x => x.Key);
}
}
}
@@ -1,19 +1,18 @@
using RGB.NET.Core;
using RGB.NET.Devices.Corsair.Native;
namespace RGB.NET.Devices.Corsair
{
internal static class NativeExtensions
{
internal static Rectangle ToRectangle(this _CorsairLedPosition position)
{
//HACK DarthAffe 08.07.2018: It seems like corsair introduced a bug here - it's always 0.
float width = position.width < 0.5f ? 10 : (float)position.width;
float height = position.height < 0.5f ? 10 : (float)position.height;
float posX = (float)position.left;
float posY = (float)position.top;
namespace RGB.NET.Devices.Corsair;
return new Rectangle(posX, posY, width, height);
}
internal static class NativeExtensions
{
internal static Rectangle ToRectangle(this _CorsairLedPosition position)
{
//HACK DarthAffe 08.07.2018: It seems like corsair introduced a bug here - it's always 0.
float width = position.width < 0.5f ? 10 : (float)position.width;
float height = position.height < 0.5f ? 10 : (float)position.height;
float posX = (float)position.left;
float posY = (float)position.top;
return new Rectangle(posX, posY, width, height);
}
}
}