diff --git a/RGB.NET.Core/Devices/IRGBDeviceProviderLoader.cs b/RGB.NET.Core/Devices/IRGBDeviceProviderLoader.cs new file mode 100644 index 0000000..1a2dd7d --- /dev/null +++ b/RGB.NET.Core/Devices/IRGBDeviceProviderLoader.cs @@ -0,0 +1,21 @@ +namespace RGB.NET.Core +{ + /// + /// Represents a generic device provider loaded used to dynamically load devices into an application. + /// + /// + public interface IRGBDeviceProviderLoader + where T : class, IRGBDeviceProviderLoader, new() + { + /// + /// Indicates if the returned device-provider needs some specific initialization before use. + /// + bool RequiresInitialization { get; } + + /// + /// Gets the device-provider. + /// + /// The device-provider. + IRGBDeviceProvider GetDeviceProvider(); + } +} diff --git a/RGB.NET.Core/RGB.NET.Core.csproj b/RGB.NET.Core/RGB.NET.Core.csproj index 69a5a23..9965122 100644 --- a/RGB.NET.Core/RGB.NET.Core.csproj +++ b/RGB.NET.Core/RGB.NET.Core.csproj @@ -59,6 +59,7 @@ + diff --git a/RGB.NET.Devices.Asus/AsusDeviceProviderLoader.cs b/RGB.NET.Devices.Asus/AsusDeviceProviderLoader.cs new file mode 100644 index 0000000..437fa33 --- /dev/null +++ b/RGB.NET.Devices.Asus/AsusDeviceProviderLoader.cs @@ -0,0 +1,24 @@ +using RGB.NET.Core; + +namespace RGB.NET.Devices.Asus +{ + /// + /// Represents a device provider loaded used to dynamically load asus devices into an application. + /// + public class AsusDeviceProviderLoader : IRGBDeviceProviderLoader + { + #region Properties & Fields + + /// + public bool RequiresInitialization => false; + + #endregion + + #region Methods + + /// + public IRGBDeviceProvider GetDeviceProvider() => AsusDeviceProvider.Instance; + + #endregion + } +} diff --git a/RGB.NET.Devices.Asus/RGB.NET.Devices.Asus.csproj b/RGB.NET.Devices.Asus/RGB.NET.Devices.Asus.csproj index 9444ac2..14dffc4 100644 --- a/RGB.NET.Devices.Asus/RGB.NET.Devices.Asus.csproj +++ b/RGB.NET.Devices.Asus/RGB.NET.Devices.Asus.csproj @@ -47,6 +47,7 @@ + diff --git a/RGB.NET.Devices.CoolerMaster/CoolerMasterDeviceProviderLoader.cs b/RGB.NET.Devices.CoolerMaster/CoolerMasterDeviceProviderLoader.cs new file mode 100644 index 0000000..85832dd --- /dev/null +++ b/RGB.NET.Devices.CoolerMaster/CoolerMasterDeviceProviderLoader.cs @@ -0,0 +1,24 @@ +using RGB.NET.Core; + +namespace RGB.NET.Devices.CoolerMaster +{ + /// + /// Represents a device provider loaded used to dynamically load cooler-master devices into an application. + /// + public class CoolerMasterDeviceProviderLoader : IRGBDeviceProviderLoader + { + #region Properties & Fields + + /// + public bool RequiresInitialization => false; + + #endregion + + #region Methods + + /// + public IRGBDeviceProvider GetDeviceProvider() => CoolerMasterDeviceProvider.Instance; + + #endregion + } +} diff --git a/RGB.NET.Devices.CoolerMaster/RGB.NET.Devices.CoolerMaster.csproj b/RGB.NET.Devices.CoolerMaster/RGB.NET.Devices.CoolerMaster.csproj index 7ae409d..f13ebd4 100644 --- a/RGB.NET.Devices.CoolerMaster/RGB.NET.Devices.CoolerMaster.csproj +++ b/RGB.NET.Devices.CoolerMaster/RGB.NET.Devices.CoolerMaster.csproj @@ -48,6 +48,7 @@ + diff --git a/RGB.NET.Devices.Corsair/CorsairDeviceProviderLoader.cs b/RGB.NET.Devices.Corsair/CorsairDeviceProviderLoader.cs new file mode 100644 index 0000000..152afe1 --- /dev/null +++ b/RGB.NET.Devices.Corsair/CorsairDeviceProviderLoader.cs @@ -0,0 +1,24 @@ +using RGB.NET.Core; + +namespace RGB.NET.Devices.Corsair +{ + /// + /// Represents a device provider loaded used to dynamically load corsair devices into an application. + /// + public class CorsairDeviceProviderLoader : IRGBDeviceProviderLoader + { + #region Properties & Fields + + /// + public bool RequiresInitialization => false; + + #endregion + + #region Methods + + /// + public IRGBDeviceProvider GetDeviceProvider() => CorsairDeviceProvider.Instance; + + #endregion + } +} diff --git a/RGB.NET.Devices.Corsair/RGB.NET.Devices.Corsair.csproj b/RGB.NET.Devices.Corsair/RGB.NET.Devices.Corsair.csproj index bf46e10..7e43d22 100644 --- a/RGB.NET.Devices.Corsair/RGB.NET.Devices.Corsair.csproj +++ b/RGB.NET.Devices.Corsair/RGB.NET.Devices.Corsair.csproj @@ -46,6 +46,7 @@ + diff --git a/RGB.NET.Devices.Debug/DebugDeviceProviderLoader.cs b/RGB.NET.Devices.Debug/DebugDeviceProviderLoader.cs new file mode 100644 index 0000000..e7c9b52 --- /dev/null +++ b/RGB.NET.Devices.Debug/DebugDeviceProviderLoader.cs @@ -0,0 +1,24 @@ +using RGB.NET.Core; + +namespace RGB.NET.Devices.Debug +{ + /// + /// Represents a device provider loaded used to dynamically load debug devices into an application. + /// + public class DebugDeviceProviderLoader : IRGBDeviceProviderLoader + { + #region Properties & Fields + + /// + public bool RequiresInitialization => false; + + #endregion + + #region Methods + + /// + public IRGBDeviceProvider GetDeviceProvider() => DebugDeviceProvider.Instance; + + #endregion + } +} diff --git a/RGB.NET.Devices.Debug/RGB.NET.Devices.Debug.csproj b/RGB.NET.Devices.Debug/RGB.NET.Devices.Debug.csproj index c0fc769..b6052fe 100644 --- a/RGB.NET.Devices.Debug/RGB.NET.Devices.Debug.csproj +++ b/RGB.NET.Devices.Debug/RGB.NET.Devices.Debug.csproj @@ -46,6 +46,7 @@ + diff --git a/RGB.NET.Devices.Logitech/LogitechDeviceProviderLoader.cs b/RGB.NET.Devices.Logitech/LogitechDeviceProviderLoader.cs new file mode 100644 index 0000000..21a7cde --- /dev/null +++ b/RGB.NET.Devices.Logitech/LogitechDeviceProviderLoader.cs @@ -0,0 +1,24 @@ +using RGB.NET.Core; + +namespace RGB.NET.Devices.Logitech +{ + /// + /// Represents a device provider loaded used to dynamically load logitech devices into an application. + /// + public class LogitechDeviceProviderLoader : IRGBDeviceProviderLoader + { + #region Properties & Fields + + /// + public bool RequiresInitialization => false; + + #endregion + + #region Methods + + /// + public IRGBDeviceProvider GetDeviceProvider() => LogitechDeviceProvider.Instance; + + #endregion + } +} diff --git a/RGB.NET.Devices.Logitech/RGB.NET.Devices.Logitech.csproj b/RGB.NET.Devices.Logitech/RGB.NET.Devices.Logitech.csproj index de8661e..94c7c94 100644 --- a/RGB.NET.Devices.Logitech/RGB.NET.Devices.Logitech.csproj +++ b/RGB.NET.Devices.Logitech/RGB.NET.Devices.Logitech.csproj @@ -56,6 +56,7 @@ + diff --git a/RGB.NET.Devices.Msi/MsiDeviceProviderLoader.cs b/RGB.NET.Devices.Msi/MsiDeviceProviderLoader.cs new file mode 100644 index 0000000..6e2b01c --- /dev/null +++ b/RGB.NET.Devices.Msi/MsiDeviceProviderLoader.cs @@ -0,0 +1,24 @@ +using RGB.NET.Core; + +namespace RGB.NET.Devices.Msi +{ + /// + /// Represents a device provider loaded used to dynamically load msi devices into an application. + /// + public class MsiDeviceProviderLoader : IRGBDeviceProviderLoader + { + #region Properties & Fields + + /// + public bool RequiresInitialization => false; + + #endregion + + #region Methods + + /// + public IRGBDeviceProvider GetDeviceProvider() => MsiDeviceProvider.Instance; + + #endregion + } +} diff --git a/RGB.NET.Devices.Msi/RGB.NET.Devices.Msi.csproj b/RGB.NET.Devices.Msi/RGB.NET.Devices.Msi.csproj index b697225..8334509 100644 --- a/RGB.NET.Devices.Msi/RGB.NET.Devices.Msi.csproj +++ b/RGB.NET.Devices.Msi/RGB.NET.Devices.Msi.csproj @@ -50,6 +50,7 @@ + diff --git a/RGB.NET.Devices.Novation/NovationDeviceProviderLoader.cs b/RGB.NET.Devices.Novation/NovationDeviceProviderLoader.cs new file mode 100644 index 0000000..cf0d763 --- /dev/null +++ b/RGB.NET.Devices.Novation/NovationDeviceProviderLoader.cs @@ -0,0 +1,24 @@ +using RGB.NET.Core; + +namespace RGB.NET.Devices.Novation +{ + /// + /// Represents a device provider loaded used to dynamically load novation devices into an application. + /// + public class NovationDeviceProviderLoader : IRGBDeviceProviderLoader + { + #region Properties & Fields + + /// + public bool RequiresInitialization => false; + + #endregion + + #region Methods + + /// + public IRGBDeviceProvider GetDeviceProvider() => NovationDeviceProvider.Instance; + + #endregion + } +} diff --git a/RGB.NET.Devices.Novation/RGB.NET.Devices.Novation.csproj b/RGB.NET.Devices.Novation/RGB.NET.Devices.Novation.csproj index 6fec2f3..75dcbd3 100644 --- a/RGB.NET.Devices.Novation/RGB.NET.Devices.Novation.csproj +++ b/RGB.NET.Devices.Novation/RGB.NET.Devices.Novation.csproj @@ -64,6 +64,7 @@ + diff --git a/RGB.NET.Devices.Razer/RGB.NET.Devices.Razer.csproj b/RGB.NET.Devices.Razer/RGB.NET.Devices.Razer.csproj index e65767a..77d5b98 100644 --- a/RGB.NET.Devices.Razer/RGB.NET.Devices.Razer.csproj +++ b/RGB.NET.Devices.Razer/RGB.NET.Devices.Razer.csproj @@ -78,6 +78,7 @@ + diff --git a/RGB.NET.Devices.Razer/RazerDeviceProviderLoader.cs b/RGB.NET.Devices.Razer/RazerDeviceProviderLoader.cs new file mode 100644 index 0000000..4bbcf46 --- /dev/null +++ b/RGB.NET.Devices.Razer/RazerDeviceProviderLoader.cs @@ -0,0 +1,24 @@ +using RGB.NET.Core; + +namespace RGB.NET.Devices.Razer +{ + /// + /// Represents a device provider loaded used to dynamically load razer devices into an application. + /// + public class RazerDeviceProviderLoader : IRGBDeviceProviderLoader + { + #region Properties & Fields + + /// + public bool RequiresInitialization => false; + + #endregion + + #region Methods + + /// + public IRGBDeviceProvider GetDeviceProvider() => RazerDeviceProvider.Instance; + + #endregion + } +} diff --git a/RGB.NET.Devices.Roccat/RGB.NET.Devices.Roccat.csproj b/RGB.NET.Devices.Roccat/RGB.NET.Devices.Roccat.csproj index 33aaed8..be3b25e 100644 --- a/RGB.NET.Devices.Roccat/RGB.NET.Devices.Roccat.csproj +++ b/RGB.NET.Devices.Roccat/RGB.NET.Devices.Roccat.csproj @@ -48,6 +48,7 @@ + diff --git a/RGB.NET.Devices.Roccat/RoccatDeviceProviderLoader.cs b/RGB.NET.Devices.Roccat/RoccatDeviceProviderLoader.cs new file mode 100644 index 0000000..9c30342 --- /dev/null +++ b/RGB.NET.Devices.Roccat/RoccatDeviceProviderLoader.cs @@ -0,0 +1,24 @@ +using RGB.NET.Core; + +namespace RGB.NET.Devices.Roccat +{ + /// + /// Represents a device provider loaded used to dynamically load roccat devices into an application. + /// + public class RoccatDeviceProviderLoader : IRGBDeviceProviderLoader + { + #region Properties & Fields + + /// + public bool RequiresInitialization => false; + + #endregion + + #region Methods + + /// + public IRGBDeviceProvider GetDeviceProvider() => RoccatDeviceProvider.Instance; + + #endregion + } +}