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

Added deviceprovider-loader to all projects

This commit is contained in:
Darth Affe 2018-01-29 12:58:36 +01:00
parent 573ca419f9
commit 5e347db063
20 changed files with 247 additions and 0 deletions

View File

@ -0,0 +1,21 @@
namespace RGB.NET.Core
{
/// <summary>
/// Represents a generic device provider loaded used to dynamically load devices into an application.
/// </summary>
/// <typeparam name="T"></typeparam>
public interface IRGBDeviceProviderLoader<T>
where T : class, IRGBDeviceProviderLoader<T>, new()
{
/// <summary>
/// Indicates if the returned device-provider needs some specific initialization before use.
/// </summary>
bool RequiresInitialization { get; }
/// <summary>
/// Gets the device-provider.
/// </summary>
/// <returns>The device-provider.</returns>
IRGBDeviceProvider GetDeviceProvider();
}
}

View File

@ -59,6 +59,7 @@
<Compile Include="Decorators\ILedGroupDecorator.cs" />
<Compile Include="Devices\AbstractRGBDevice.cs" />
<Compile Include="Devices\DeviceUpdateMode.cs" />
<Compile Include="Devices\IRGBDeviceProviderLoader.cs" />
<Compile Include="Devices\IRGBDeviceSpecialPart.cs" />
<Compile Include="Devices\Layout\LedImage.cs" />
<Compile Include="Devices\Layout\LedImageLayout.cs" />

View File

@ -0,0 +1,24 @@
using RGB.NET.Core;
namespace RGB.NET.Devices.Asus
{
/// <summary>
/// Represents a device provider loaded used to dynamically load asus devices into an application.
/// </summary>
public class AsusDeviceProviderLoader : IRGBDeviceProviderLoader<AsusDeviceProviderLoader>
{
#region Properties & Fields
/// <inheritdoc />
public bool RequiresInitialization => false;
#endregion
#region Methods
/// <inheritdoc />
public IRGBDeviceProvider GetDeviceProvider() => AsusDeviceProvider.Instance;
#endregion
}
}

View File

@ -47,6 +47,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="AsusDeviceProvider.cs" />
<Compile Include="AsusDeviceProviderLoader.cs" />
<Compile Include="Dram\AsusDramRGBDevice.cs" />
<Compile Include="Dram\AsusDramRGBDeviceInfo.cs" />
<Compile Include="Enum\AsusLogicalKeyboardLayout.cs" />

View File

@ -0,0 +1,24 @@
using RGB.NET.Core;
namespace RGB.NET.Devices.CoolerMaster
{
/// <summary>
/// Represents a device provider loaded used to dynamically load cooler-master devices into an application.
/// </summary>
public class CoolerMasterDeviceProviderLoader : IRGBDeviceProviderLoader<CoolerMasterDeviceProviderLoader>
{
#region Properties & Fields
/// <inheritdoc />
public bool RequiresInitialization => false;
#endregion
#region Methods
/// <inheritdoc />
public IRGBDeviceProvider GetDeviceProvider() => CoolerMasterDeviceProvider.Instance;
#endregion
}
}

View File

@ -48,6 +48,7 @@
<ItemGroup>
<Compile Include="Attributes\DeviceTypeAttribute.cs" />
<Compile Include="CoolerMasterDeviceProvider.cs" />
<Compile Include="CoolerMasterDeviceProviderLoader.cs" />
<Compile Include="Enum\CoolerMasterPhysicalKeyboardLayout.cs" />
<Compile Include="Enum\CoolerMasterDevicesIndexes.cs" />
<Compile Include="Enum\CoolerMasterEffects.cs" />

View File

@ -0,0 +1,24 @@
using RGB.NET.Core;
namespace RGB.NET.Devices.Corsair
{
/// <summary>
/// Represents a device provider loaded used to dynamically load corsair devices into an application.
/// </summary>
public class CorsairDeviceProviderLoader : IRGBDeviceProviderLoader<CorsairDeviceProviderLoader>
{
#region Properties & Fields
/// <inheritdoc />
public bool RequiresInitialization => false;
#endregion
#region Methods
/// <inheritdoc />
public IRGBDeviceProvider GetDeviceProvider() => CorsairDeviceProvider.Instance;
#endregion
}
}

View File

@ -46,6 +46,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="CorsairDeviceProvider.cs" />
<Compile Include="CorsairDeviceProviderLoader.cs" />
<Compile Include="Enum\CorsairAccessMode.cs" />
<Compile Include="Enum\CorsairDeviceCaps.cs" />
<Compile Include="Enum\CorsairDeviceType.cs" />

View File

@ -0,0 +1,24 @@
using RGB.NET.Core;
namespace RGB.NET.Devices.Debug
{
/// <summary>
/// Represents a device provider loaded used to dynamically load debug devices into an application.
/// </summary>
public class DebugDeviceProviderLoader : IRGBDeviceProviderLoader<DebugDeviceProviderLoader>
{
#region Properties & Fields
/// <inheritdoc />
public bool RequiresInitialization => false;
#endregion
#region Methods
/// <inheritdoc />
public IRGBDeviceProvider GetDeviceProvider() => DebugDeviceProvider.Instance;
#endregion
}
}

View File

@ -46,6 +46,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="DebugDeviceProvider.cs" />
<Compile Include="DebugDeviceProviderLoader.cs" />
<Compile Include="DebugRGBDevice.cs" />
<Compile Include="DebugRGBDeviceInfo.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />

View File

@ -0,0 +1,24 @@
using RGB.NET.Core;
namespace RGB.NET.Devices.Logitech
{
/// <summary>
/// Represents a device provider loaded used to dynamically load logitech devices into an application.
/// </summary>
public class LogitechDeviceProviderLoader : IRGBDeviceProviderLoader<LogitechDeviceProviderLoader>
{
#region Properties & Fields
/// <inheritdoc />
public bool RequiresInitialization => false;
#endregion
#region Methods
/// <inheritdoc />
public IRGBDeviceProvider GetDeviceProvider() => LogitechDeviceProvider.Instance;
#endregion
}
}

View File

@ -56,6 +56,7 @@
<Compile Include="Generic\ILogitechRGBDevice.cs" />
<Compile Include="Generic\LogitechRGBDevice.cs" />
<Compile Include="Generic\LogitechRGBDeviceInfo.cs" />
<Compile Include="LogitechDeviceProviderLoader.cs" />
<Compile Include="PerKey\BitmapMapping.cs" />
<Compile Include="HID\DeviceChecker.cs" />
<Compile Include="LogitechDeviceProvider.cs" />

View File

@ -0,0 +1,24 @@
using RGB.NET.Core;
namespace RGB.NET.Devices.Msi
{
/// <summary>
/// Represents a device provider loaded used to dynamically load msi devices into an application.
/// </summary>
public class MsiDeviceProviderLoader : IRGBDeviceProviderLoader<MsiDeviceProviderLoader>
{
#region Properties & Fields
/// <inheritdoc />
public bool RequiresInitialization => false;
#endregion
#region Methods
/// <inheritdoc />
public IRGBDeviceProvider GetDeviceProvider() => MsiDeviceProvider.Instance;
#endregion
}
}

View File

@ -50,6 +50,7 @@
<Compile Include="Generic\MsiRGBDevice.cs" />
<Compile Include="Generic\MsiRGBDeviceInfo.cs" />
<Compile Include="MsiDeviceProvider.cs" />
<Compile Include="MsiDeviceProviderLoader.cs" />
<Compile Include="Native\_MsiSDK.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>

View File

@ -0,0 +1,24 @@
using RGB.NET.Core;
namespace RGB.NET.Devices.Novation
{
/// <summary>
/// Represents a device provider loaded used to dynamically load novation devices into an application.
/// </summary>
public class NovationDeviceProviderLoader : IRGBDeviceProviderLoader<NovationDeviceProviderLoader>
{
#region Properties & Fields
/// <inheritdoc />
public bool RequiresInitialization => false;
#endregion
#region Methods
/// <inheritdoc />
public IRGBDeviceProvider GetDeviceProvider() => NovationDeviceProvider.Instance;
#endregion
}
}

View File

@ -64,6 +64,7 @@
<Compile Include="Launchpad\NovationLaunchpadRGBDevice.cs" />
<Compile Include="Launchpad\NovationLaunchpadRGBDeviceInfo.cs" />
<Compile Include="NovationDeviceProvider.cs" />
<Compile Include="NovationDeviceProviderLoader.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup />

View File

@ -78,6 +78,7 @@
<Compile Include="Enum\RazerError.cs" />
<Compile Include="Native\_RazerSDK.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="RazerDeviceProviderLoader.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\RGB.NET.Core\RGB.NET.Core.csproj">

View File

@ -0,0 +1,24 @@
using RGB.NET.Core;
namespace RGB.NET.Devices.Razer
{
/// <summary>
/// Represents a device provider loaded used to dynamically load razer devices into an application.
/// </summary>
public class RazerDeviceProviderLoader : IRGBDeviceProviderLoader<RazerDeviceProviderLoader>
{
#region Properties & Fields
/// <inheritdoc />
public bool RequiresInitialization => false;
#endregion
#region Methods
/// <inheritdoc />
public IRGBDeviceProvider GetDeviceProvider() => RazerDeviceProvider.Instance;
#endregion
}
}

View File

@ -48,6 +48,7 @@
<Compile Include="Native\_RoccatSDK.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="RoccatDeviceProvider.cs" />
<Compile Include="RoccatDeviceProviderLoader.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />

View File

@ -0,0 +1,24 @@
using RGB.NET.Core;
namespace RGB.NET.Devices.Roccat
{
/// <summary>
/// Represents a device provider loaded used to dynamically load roccat devices into an application.
/// </summary>
public class RoccatDeviceProviderLoader : IRGBDeviceProviderLoader<RoccatDeviceProviderLoader>
{
#region Properties & Fields
/// <inheritdoc />
public bool RequiresInitialization => false;
#endregion
#region Methods
/// <inheritdoc />
public IRGBDeviceProvider GetDeviceProvider() => RoccatDeviceProvider.Instance;
#endregion
}
}