1
0
mirror of https://github.com/DarthAffe/RGB.NET.git synced 2025-12-12 09:38:31 +00:00

Changed locks to use the new Lock-type for .net9

This commit is contained in:
DarthAffe 2025-02-08 12:08:12 +01:00
parent 47770c00b8
commit 5633f82b3b
41 changed files with 128 additions and 19 deletions

View File

@ -0,0 +1,7 @@
#if NET8_0
namespace RGB.NET.Core.Compatibility.Net8;
public sealed class Lock;
#endif

View File

@ -24,7 +24,7 @@ public static class TimerHelper
#region Properties & Fields #region Properties & Fields
private static readonly object HIGH_RESOLUTION_TIMER_LOCK = new(); private static readonly Lock HIGH_RESOLUTION_TIMER_LOCK = new();
private static bool _areHighResolutionTimersEnabled = false; private static bool _areHighResolutionTimersEnabled = false;

View File

@ -52,6 +52,10 @@
<DefineConstants>RELEASE</DefineConstants> <DefineConstants>RELEASE</DefineConstants>
</PropertyGroup> </PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<Using Include="RGB.NET.Core.Compatibility.Net8" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="..\Resources\icon.png" Link="icon.png" Pack="true" PackagePath="\" /> <Content Include="..\Resources\icon.png" Link="icon.png" Pack="true" PackagePath="\" />
<None Include="README.md" Pack="true" PackagePath="\" /> <None Include="README.md" Pack="true" PackagePath="\" />

View File

@ -1,6 +1,7 @@
using System; using System;
using System.Buffers; using System.Buffers;
using System.Collections.Generic; using System.Collections.Generic;
using System.Threading;
namespace RGB.NET.Core; namespace RGB.NET.Core;
@ -14,7 +15,7 @@ public abstract class UpdateQueue<TIdentifier, TData> : AbstractReferenceCountin
{ {
#region Properties & Fields #region Properties & Fields
private readonly object _dataLock = new(); private readonly Lock _dataLock = new();
private readonly IDeviceUpdateTrigger _updateTrigger; private readonly IDeviceUpdateTrigger _updateTrigger;
private readonly Dictionary<TIdentifier, TData> _currentDataSet = []; private readonly Dictionary<TIdentifier, TData> _currentDataSet = [];

View File

@ -14,7 +14,7 @@ public sealed class TimerUpdateTrigger : AbstractUpdateTrigger
{ {
#region Properties & Fields #region Properties & Fields
private readonly object _lock = new(); private readonly Lock _lock = new();
private readonly CustomUpdateData? _customUpdateData; private readonly CustomUpdateData? _customUpdateData;

View File

@ -3,6 +3,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Threading;
using AuraServiceLib; using AuraServiceLib;
using RGB.NET.Core; using RGB.NET.Core;
@ -17,7 +18,7 @@ public sealed class AsusDeviceProvider : AbstractRGBDeviceProvider
#region Properties & Fields #region Properties & Fields
// ReSharper disable once InconsistentNaming // ReSharper disable once InconsistentNaming
private static readonly object _lock = new(); private static readonly Lock _lock = new();
private static AsusDeviceProvider? _instance; private static AsusDeviceProvider? _instance;
/// <summary> /// <summary>

View File

@ -51,6 +51,10 @@
<DefineConstants>RELEASE</DefineConstants> <DefineConstants>RELEASE</DefineConstants>
</PropertyGroup> </PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<Using Include="RGB.NET.Core.Compatibility.Net8" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="..\Resources\icon.png" Link="icon.png" Pack="true" PackagePath="\" /> <Content Include="..\Resources\icon.png" Link="icon.png" Pack="true" PackagePath="\" />
<None Include="README.md" Pack="true" PackagePath="\" /> <None Include="README.md" Pack="true" PackagePath="\" />

View File

@ -3,6 +3,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Threading;
using RGB.NET.Core; using RGB.NET.Core;
using RGB.NET.Devices.CoolerMaster.Helper; using RGB.NET.Devices.CoolerMaster.Helper;
using RGB.NET.Devices.CoolerMaster.Native; using RGB.NET.Devices.CoolerMaster.Native;
@ -18,7 +19,7 @@ public sealed class CoolerMasterDeviceProvider : AbstractRGBDeviceProvider
#region Properties & Fields #region Properties & Fields
// ReSharper disable once InconsistentNaming // ReSharper disable once InconsistentNaming
private static readonly object _lock = new(); private static readonly Lock _lock = new();
private static CoolerMasterDeviceProvider? _instance; private static CoolerMasterDeviceProvider? _instance;
/// <summary> /// <summary>

View File

@ -51,6 +51,10 @@
<DefineConstants>RELEASE</DefineConstants> <DefineConstants>RELEASE</DefineConstants>
</PropertyGroup> </PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<Using Include="RGB.NET.Core.Compatibility.Net8" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="..\Resources\icon.png" Link="icon.png" Pack="true" PackagePath="\" /> <Content Include="..\Resources\icon.png" Link="icon.png" Pack="true" PackagePath="\" />
<None Include="README.md" Pack="true" PackagePath="\" /> <None Include="README.md" Pack="true" PackagePath="\" />

View File

@ -18,7 +18,7 @@ public sealed class CorsairDeviceProvider : AbstractRGBDeviceProvider
#region Properties & Fields #region Properties & Fields
// ReSharper disable once InconsistentNaming // ReSharper disable once InconsistentNaming
private static readonly object _lock = new(); private static readonly Lock _lock = new();
private static CorsairDeviceProvider? _instance; private static CorsairDeviceProvider? _instance;
/// <summary> /// <summary>

View File

@ -52,6 +52,10 @@
<DefineConstants>RELEASE</DefineConstants> <DefineConstants>RELEASE</DefineConstants>
</PropertyGroup> </PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<Using Include="RGB.NET.Core.Compatibility.Net8" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="..\Resources\icon.png" Link="icon.png" Pack="true" PackagePath="\" /> <Content Include="..\Resources\icon.png" Link="icon.png" Pack="true" PackagePath="\" />
<None Include="README.md" Pack="true" PackagePath="\" /> <None Include="README.md" Pack="true" PackagePath="\" />

View File

@ -5,6 +5,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Threading;
using RGB.NET.Core; using RGB.NET.Core;
using RGB.NET.Devices.CorsairLegacy.Native; using RGB.NET.Devices.CorsairLegacy.Native;
@ -19,7 +20,7 @@ public sealed class CorsairLegacyDeviceProvider : AbstractRGBDeviceProvider
#region Properties & Fields #region Properties & Fields
// ReSharper disable once InconsistentNaming // ReSharper disable once InconsistentNaming
private static readonly object _lock = new(); private static readonly Lock _lock = new();
private static CorsairLegacyDeviceProvider? _instance; private static CorsairLegacyDeviceProvider? _instance;
/// <summary> /// <summary>

View File

@ -52,6 +52,10 @@
<DefineConstants>RELEASE</DefineConstants> <DefineConstants>RELEASE</DefineConstants>
</PropertyGroup> </PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<Using Include="RGB.NET.Core.Compatibility.Net8" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="..\Resources\icon.png" Link="icon.png" Pack="true" PackagePath="\" /> <Content Include="..\Resources\icon.png" Link="icon.png" Pack="true" PackagePath="\" />
<None Include="README.md" Pack="true" PackagePath="\" /> <None Include="README.md" Pack="true" PackagePath="\" />

View File

@ -3,6 +3,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Threading;
using RGB.NET.Core; using RGB.NET.Core;
using RGB.NET.Devices.DMX.E131; using RGB.NET.Devices.DMX.E131;
@ -17,7 +18,7 @@ public sealed class DMXDeviceProvider : AbstractRGBDeviceProvider
#region Properties & Fields #region Properties & Fields
// ReSharper disable once InconsistentNaming // ReSharper disable once InconsistentNaming
private static readonly object _lock = new(); private static readonly Lock _lock = new();
private static DMXDeviceProvider? _instance; private static DMXDeviceProvider? _instance;
/// <summary> /// <summary>

View File

@ -51,6 +51,10 @@
<DefineConstants>RELEASE</DefineConstants> <DefineConstants>RELEASE</DefineConstants>
</PropertyGroup> </PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<Using Include="RGB.NET.Core.Compatibility.Net8" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="..\Resources\icon.png" Link="icon.png" Pack="true" PackagePath="\" /> <Content Include="..\Resources\icon.png" Link="icon.png" Pack="true" PackagePath="\" />
<None Include="README.md" Pack="true" PackagePath="\" /> <None Include="README.md" Pack="true" PackagePath="\" />

View File

@ -3,6 +3,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Threading;
using RGB.NET.Core; using RGB.NET.Core;
using RGB.NET.Layout; using RGB.NET.Layout;
@ -17,7 +18,7 @@ public sealed class DebugDeviceProvider : AbstractRGBDeviceProvider
#region Properties & Fields #region Properties & Fields
// ReSharper disable once InconsistentNaming // ReSharper disable once InconsistentNaming
private static readonly object _lock = new(); private static readonly Lock _lock = new();
private static DebugDeviceProvider? _instance; private static DebugDeviceProvider? _instance;
/// <summary> /// <summary>

View File

@ -51,6 +51,10 @@
<DefineConstants>RELEASE</DefineConstants> <DefineConstants>RELEASE</DefineConstants>
</PropertyGroup> </PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<Using Include="RGB.NET.Core.Compatibility.Net8" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="..\Resources\icon.png" Link="icon.png" Pack="true" PackagePath="\" /> <Content Include="..\Resources\icon.png" Link="icon.png" Pack="true" PackagePath="\" />
<None Include="README.md" Pack="true" PackagePath="\" /> <None Include="README.md" Pack="true" PackagePath="\" />

View File

@ -4,6 +4,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Threading;
using HidSharp; using HidSharp;
using RGB.NET.Core; using RGB.NET.Core;
using RGB.NET.Devices.Logitech.Native; using RGB.NET.Devices.Logitech.Native;
@ -21,7 +22,7 @@ public class LogitechDeviceProvider : AbstractRGBDeviceProvider
#region Properties & Fields #region Properties & Fields
// ReSharper disable once InconsistentNaming // ReSharper disable once InconsistentNaming
private static readonly object _lock = new(); private static readonly Lock _lock = new();
private static LogitechDeviceProvider? _instance; private static LogitechDeviceProvider? _instance;
/// <summary> /// <summary>

View File

@ -52,6 +52,10 @@
<DefineConstants>RELEASE</DefineConstants> <DefineConstants>RELEASE</DefineConstants>
</PropertyGroup> </PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<Using Include="RGB.NET.Core.Compatibility.Net8" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="..\Resources\icon.png" Link="icon.png" Pack="true" PackagePath="\" /> <Content Include="..\Resources\icon.png" Link="icon.png" Pack="true" PackagePath="\" />
<None Include="README.md" Pack="true" PackagePath="\" /> <None Include="README.md" Pack="true" PackagePath="\" />

View File

@ -3,6 +3,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Threading;
using RGB.NET.Core; using RGB.NET.Core;
using RGB.NET.Devices.Msi.Exceptions; using RGB.NET.Devices.Msi.Exceptions;
using RGB.NET.Devices.Msi.Native; using RGB.NET.Devices.Msi.Native;
@ -18,7 +19,7 @@ public class MsiDeviceProvider : AbstractRGBDeviceProvider
#region Properties & Fields #region Properties & Fields
// ReSharper disable once InconsistentNaming // ReSharper disable once InconsistentNaming
private static readonly object _lock = new(); private static readonly Lock _lock = new();
private static MsiDeviceProvider? _instance; private static MsiDeviceProvider? _instance;
/// <summary> /// <summary>

View File

@ -51,6 +51,10 @@
<DefineConstants>RELEASE</DefineConstants> <DefineConstants>RELEASE</DefineConstants>
</PropertyGroup> </PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<Using Include="RGB.NET.Core.Compatibility.Net8" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="..\Resources\icon.png" Link="icon.png" Pack="true" PackagePath="\" /> <Content Include="..\Resources\icon.png" Link="icon.png" Pack="true" PackagePath="\" />
<None Include="README.md" Pack="true" PackagePath="\" /> <None Include="README.md" Pack="true" PackagePath="\" />

View File

@ -4,6 +4,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Threading;
using RGB.NET.Core; using RGB.NET.Core;
using Sanford.Multimedia.Midi; using Sanford.Multimedia.Midi;
@ -18,7 +19,7 @@ public sealed class NovationDeviceProvider : AbstractRGBDeviceProvider
#region Properties & Fields #region Properties & Fields
// ReSharper disable once InconsistentNaming // ReSharper disable once InconsistentNaming
private static readonly object _lock = new(); private static readonly Lock _lock = new();
private static NovationDeviceProvider? _instance; private static NovationDeviceProvider? _instance;
/// <summary> /// <summary>

View File

@ -51,6 +51,10 @@
<DefineConstants>RELEASE</DefineConstants> <DefineConstants>RELEASE</DefineConstants>
</PropertyGroup> </PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<Using Include="RGB.NET.Core.Compatibility.Net8" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="..\Resources\icon.png" Link="icon.png" Pack="true" PackagePath="\" /> <Content Include="..\Resources\icon.png" Link="icon.png" Pack="true" PackagePath="\" />
<None Include="README.md" Pack="true" PackagePath="\" /> <None Include="README.md" Pack="true" PackagePath="\" />

View File

@ -3,6 +3,7 @@ using RGB.NET.Core;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Threading;
namespace RGB.NET.Devices.OpenRGB; namespace RGB.NET.Devices.OpenRGB;
@ -15,7 +16,7 @@ public sealed class OpenRGBDeviceProvider : AbstractRGBDeviceProvider
#region Properties & Fields #region Properties & Fields
// ReSharper disable once InconsistentNaming // ReSharper disable once InconsistentNaming
private static readonly object _lock = new(); private static readonly Lock _lock = new();
private readonly List<OpenRgbClient> _clients = []; private readonly List<OpenRgbClient> _clients = [];

View File

@ -51,6 +51,10 @@
<DefineConstants>RELEASE</DefineConstants> <DefineConstants>RELEASE</DefineConstants>
</PropertyGroup> </PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<Using Include="RGB.NET.Core.Compatibility.Net8" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="..\Resources\icon.png" Link="icon.png" Pack="true" PackagePath="\" /> <Content Include="..\Resources\icon.png" Link="icon.png" Pack="true" PackagePath="\" />
<None Include="README.md" Pack="true" PackagePath="\" /> <None Include="README.md" Pack="true" PackagePath="\" />

View File

@ -3,6 +3,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Threading;
using HidSharp; using HidSharp;
using RGB.NET.Core; using RGB.NET.Core;
using RGB.NET.Devices.PicoPi.Enum; using RGB.NET.Devices.PicoPi.Enum;
@ -26,7 +27,7 @@ public sealed class PicoPiDeviceProvider : AbstractRGBDeviceProvider
#region Properties & Fields #region Properties & Fields
// ReSharper disable once InconsistentNaming // ReSharper disable once InconsistentNaming
private static readonly object _lock = new(); private static readonly Lock _lock = new();
private static PicoPiDeviceProvider? _instance; private static PicoPiDeviceProvider? _instance;
/// <summary> /// <summary>

View File

@ -51,6 +51,10 @@
<DefineConstants>RELEASE</DefineConstants> <DefineConstants>RELEASE</DefineConstants>
</PropertyGroup> </PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<Using Include="RGB.NET.Core.Compatibility.Net8" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="..\Resources\icon.png" Link="icon.png" Pack="true" PackagePath="\" /> <Content Include="..\Resources\icon.png" Link="icon.png" Pack="true" PackagePath="\" />
<None Include="README.md" Pack="true" PackagePath="\" /> <None Include="README.md" Pack="true" PackagePath="\" />

View File

@ -52,6 +52,10 @@
<DefineConstants>RELEASE</DefineConstants> <DefineConstants>RELEASE</DefineConstants>
</PropertyGroup> </PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<Using Include="RGB.NET.Core.Compatibility.Net8" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="..\Resources\icon.png" Link="icon.png" Pack="true" PackagePath="\" /> <Content Include="..\Resources\icon.png" Link="icon.png" Pack="true" PackagePath="\" />
<None Include="README.md" Pack="true" PackagePath="\" /> <None Include="README.md" Pack="true" PackagePath="\" />

View File

@ -5,6 +5,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Threading;
using RGB.NET.Core; using RGB.NET.Core;
using RGB.NET.Devices.Razer.Native; using RGB.NET.Devices.Razer.Native;
using RGB.NET.HID; using RGB.NET.HID;
@ -20,7 +21,7 @@ public sealed class RazerDeviceProvider : AbstractRGBDeviceProvider
#region Properties & Fields #region Properties & Fields
// ReSharper disable once InconsistentNaming // ReSharper disable once InconsistentNaming
private static readonly object _lock = new(); private static readonly Lock _lock = new();
private static RazerDeviceProvider? _instance; private static RazerDeviceProvider? _instance;
/// <summary> /// <summary>

View File

@ -51,6 +51,10 @@
<DefineConstants>RELEASE</DefineConstants> <DefineConstants>RELEASE</DefineConstants>
</PropertyGroup> </PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<Using Include="RGB.NET.Core.Compatibility.Net8" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="..\Resources\icon.png" Link="icon.png" Pack="true" PackagePath="\" /> <Content Include="..\Resources\icon.png" Link="icon.png" Pack="true" PackagePath="\" />
<None Include="README.md" Pack="true" PackagePath="\" /> <None Include="README.md" Pack="true" PackagePath="\" />

View File

@ -1,5 +1,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Threading;
using RGB.NET.Core; using RGB.NET.Core;
using RGB.NET.Devices.SteelSeries.API; using RGB.NET.Devices.SteelSeries.API;
using RGB.NET.HID; using RGB.NET.HID;
@ -21,7 +22,7 @@ public sealed class SteelSeriesDeviceProvider : AbstractRGBDeviceProvider
#region Properties & Fields #region Properties & Fields
// ReSharper disable once InconsistentNaming // ReSharper disable once InconsistentNaming
private static readonly object _lock = new(); private static readonly Lock _lock = new();
private static SteelSeriesDeviceProvider? _instance; private static SteelSeriesDeviceProvider? _instance;
/// <summary> /// <summary>

View File

@ -51,6 +51,10 @@
<DefineConstants>RELEASE</DefineConstants> <DefineConstants>RELEASE</DefineConstants>
</PropertyGroup> </PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<Using Include="RGB.NET.Core.Compatibility.Net8" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="..\Resources\icon.png" Link="icon.png" Pack="true" PackagePath="\" /> <Content Include="..\Resources\icon.png" Link="icon.png" Pack="true" PackagePath="\" />
<None Include="README.md" Pack="true" PackagePath="\" /> <None Include="README.md" Pack="true" PackagePath="\" />

View File

@ -2,6 +2,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Threading;
using RGB.NET.Core; using RGB.NET.Core;
namespace RGB.NET.Devices.WLED; namespace RGB.NET.Devices.WLED;
@ -23,7 +24,7 @@ public sealed class WledDeviceProvider : AbstractRGBDeviceProvider
#region Properties & Fields #region Properties & Fields
// ReSharper disable once InconsistentNaming // ReSharper disable once InconsistentNaming
private static readonly object _lock = new(); private static readonly Lock _lock = new();
private static WledDeviceProvider? _instance; private static WledDeviceProvider? _instance;
/// <summary> /// <summary>

View File

@ -51,6 +51,10 @@
<DefineConstants>RELEASE</DefineConstants> <DefineConstants>RELEASE</DefineConstants>
</PropertyGroup> </PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<Using Include="RGB.NET.Core.Compatibility.Net8" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="..\Resources\icon.png" Link="icon.png" Pack="true" PackagePath="\" /> <Content Include="..\Resources\icon.png" Link="icon.png" Pack="true" PackagePath="\" />
<None Include="README.md" Pack="true" PackagePath="\" /> <None Include="README.md" Pack="true" PackagePath="\" />

View File

@ -2,6 +2,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Threading;
using RGB.NET.Core; using RGB.NET.Core;
namespace RGB.NET.Devices.WS281X; namespace RGB.NET.Devices.WS281X;
@ -17,7 +18,7 @@ public sealed class WS281XDeviceProvider : AbstractRGBDeviceProvider
#region Properties & Fields #region Properties & Fields
// ReSharper disable once InconsistentNaming // ReSharper disable once InconsistentNaming
private static readonly object _lock = new(); private static readonly Lock _lock = new();
private static WS281XDeviceProvider? _instance; private static WS281XDeviceProvider? _instance;
/// <summary> /// <summary>

View File

@ -52,6 +52,10 @@
<DefineConstants>RELEASE</DefineConstants> <DefineConstants>RELEASE</DefineConstants>
</PropertyGroup> </PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<Using Include="RGB.NET.Core.Compatibility.Net8" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="..\Resources\icon.png" Link="icon.png" Pack="true" PackagePath="\" /> <Content Include="..\Resources\icon.png" Link="icon.png" Pack="true" PackagePath="\" />
<None Include="README.md" Pack="true" PackagePath="\" /> <None Include="README.md" Pack="true" PackagePath="\" />

View File

@ -1,6 +1,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Threading;
using RGB.NET.Core; using RGB.NET.Core;
using RGB.NET.Devices.Wooting.Enum; using RGB.NET.Devices.Wooting.Enum;
using RGB.NET.Devices.Wooting.Generic; using RGB.NET.Devices.Wooting.Generic;
@ -19,7 +20,7 @@ public sealed class WootingDeviceProvider : AbstractRGBDeviceProvider
#region Properties & Fields #region Properties & Fields
// ReSharper disable once InconsistentNaming // ReSharper disable once InconsistentNaming
private static readonly object _lock = new(); private static readonly Lock _lock = new();
private static WootingDeviceProvider? _instance; private static WootingDeviceProvider? _instance;
/// <summary> /// <summary>

View File

@ -51,6 +51,10 @@
<DefineConstants>RELEASE</DefineConstants> <DefineConstants>RELEASE</DefineConstants>
</PropertyGroup> </PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<Using Include="RGB.NET.Core.Compatibility.Net8" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="..\Resources\icon.png" Link="icon.png" Pack="true" PackagePath="\" /> <Content Include="..\Resources\icon.png" Link="icon.png" Pack="true" PackagePath="\" />
<None Include="README.md" Pack="true" PackagePath="\" /> <None Include="README.md" Pack="true" PackagePath="\" />

View File

@ -51,6 +51,10 @@
<DefineConstants>RELEASE</DefineConstants> <DefineConstants>RELEASE</DefineConstants>
</PropertyGroup> </PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<Using Include="RGB.NET.Core.Compatibility.Net8" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="..\Resources\icon.png" Link="icon.png" Pack="true" PackagePath="\" /> <Content Include="..\Resources\icon.png" Link="icon.png" Pack="true" PackagePath="\" />
<None Include="README.md" Pack="true" PackagePath="\" /> <None Include="README.md" Pack="true" PackagePath="\" />

View File

@ -52,6 +52,10 @@
<DefineConstants>RELEASE</DefineConstants> <DefineConstants>RELEASE</DefineConstants>
</PropertyGroup> </PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<Using Include="RGB.NET.Core.Compatibility.Net8" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="..\Resources\icon.png" Link="icon.png" Pack="true" PackagePath="\" /> <Content Include="..\Resources\icon.png" Link="icon.png" Pack="true" PackagePath="\" />
<None Include="README.md" Pack="true" PackagePath="\" /> <None Include="README.md" Pack="true" PackagePath="\" />

View File

@ -308,6 +308,11 @@
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateConstants/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="AA_BB" /&gt;</s:String> <s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateConstants/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="AA_BB" /&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateStaticReadonly/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="AA_BB" /&gt;</s:String> <s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateStaticReadonly/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="AA_BB" /&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=StaticReadonly/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="AA_BB" /&gt;</s:String> <s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=StaticReadonly/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="AA_BB" /&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=15b5b1f1_002D457c_002D4ca6_002Db278_002D5615aedc07d3/@EntryIndexedValue">&lt;Policy&gt;&lt;Descriptor Staticness="Static" AccessRightKinds="Private" Description="Static readonly fields (private)"&gt;&lt;ElementKinds&gt;&lt;Kind Name="READONLY_FIELD" /&gt;&lt;/ElementKinds&gt;&lt;/Descriptor&gt;&lt;Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="AA_BB" /&gt;&lt;/Policy&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=236f7aa5_002D7b06_002D43ca_002Dbf2a_002D9b31bfcff09a/@EntryIndexedValue">&lt;Policy&gt;&lt;Descriptor Staticness="Any" AccessRightKinds="Private" Description="Constant fields (private)"&gt;&lt;ElementKinds&gt;&lt;Kind Name="CONSTANT_FIELD" /&gt;&lt;/ElementKinds&gt;&lt;/Descriptor&gt;&lt;Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="AA_BB" /&gt;&lt;/Policy&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=669e5282_002Dfb4b_002D4e90_002D91e7_002D07d269d04b60/@EntryIndexedValue">&lt;Policy&gt;&lt;Descriptor Staticness="Any" AccessRightKinds="Protected, ProtectedInternal, Internal, Public, PrivateProtected" Description="Constant fields (not private)"&gt;&lt;ElementKinds&gt;&lt;Kind Name="CONSTANT_FIELD" /&gt;&lt;/ElementKinds&gt;&lt;/Descriptor&gt;&lt;Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="AA_BB" /&gt;&lt;/Policy&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=a4f433b8_002Dabcd_002D4e55_002Da08f_002D82e78cef0f0c/@EntryIndexedValue">&lt;Policy&gt;&lt;Descriptor Staticness="Any" AccessRightKinds="Any" Description="Local constants"&gt;&lt;ElementKinds&gt;&lt;Kind Name="LOCAL_CONSTANT" /&gt;&lt;/ElementKinds&gt;&lt;/Descriptor&gt;&lt;Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="AA_BB" /&gt;&lt;/Policy&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=c873eafb_002Dd57f_002D481d_002D8c93_002D77f6863c2f88/@EntryIndexedValue">&lt;Policy&gt;&lt;Descriptor Staticness="Static" AccessRightKinds="Protected, ProtectedInternal, Internal, Public, PrivateProtected" Description="Static readonly fields (not private)"&gt;&lt;ElementKinds&gt;&lt;Kind Name="READONLY_FIELD" /&gt;&lt;/ElementKinds&gt;&lt;/Descriptor&gt;&lt;Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="AA_BB" /&gt;&lt;/Policy&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=JS_005FBLOCK_005FSCOPE_005FCONSTANT/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /&gt;</s:String> <s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=JS_005FBLOCK_005FSCOPE_005FCONSTANT/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=JS_005FBLOCK_005FSCOPE_005FFUNCTION/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /&gt;</s:String> <s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=JS_005FBLOCK_005FSCOPE_005FFUNCTION/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=JS_005FBLOCK_005FSCOPE_005FVARIABLE/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /&gt;</s:String> <s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=JS_005FBLOCK_005FSCOPE_005FVARIABLE/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /&gt;</s:String>
@ -358,6 +363,7 @@
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002ECSharpPlaceAttributeOnSameLineMigration/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002ECSharpPlaceAttributeOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateBlankLinesAroundFieldToBlankLinesAroundProperty/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateBlankLinesAroundFieldToBlankLinesAroundProperty/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateThisQualifierSettings/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateThisQualifierSettings/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EPredefinedNamingRulesToUserRulesUpgrade/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002EJavaScript_002ECodeStyle_002ESettingsUpgrade_002EJsCodeFormatterSettingsUpgrader/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002EJavaScript_002ECodeStyle_002ESettingsUpgrade_002EJsCodeFormatterSettingsUpgrader/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002EJavaScript_002ECodeStyle_002ESettingsUpgrade_002EJsParsFormattingSettingsUpgrader/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002EJavaScript_002ECodeStyle_002ESettingsUpgrade_002EJsParsFormattingSettingsUpgrader/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002EJavaScript_002ECodeStyle_002ESettingsUpgrade_002EJsWrapperSettingsUpgrader/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary> <s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002EJavaScript_002ECodeStyle_002ESettingsUpgrade_002EJsWrapperSettingsUpgrader/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>