Interface IRGBDeviceProvider
Represents a generic device provider.
Inherited Members
Namespace: RGB.NET.Core
Assembly: RGB.NET.Core.dll
Syntax
public interface IRGBDeviceProvider : IDisposable
Properties
| Edit this page View SourceDevices
Gets a collection of IRGBDevice loaded by this IRGBDeviceProvider.
Declaration
IReadOnlyList<IRGBDevice> Devices { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<IRGBDevice> |
IsInitialized
Indicates if the used SDK is initialized and ready to use.
Declaration
bool IsInitialized { get; }
Property Value
Type | Description |
---|---|
bool |
ThrowsExceptions
Indicates if exceptions in the device provider are thrown or silently ignored.
Declaration
bool ThrowsExceptions { get; }
Property Value
Type | Description |
---|---|
bool |
Remarks
This should only be set to true
for debugging/development purposes.
Production code should use the Exception-Event to handle exceptions.
UpdateTriggers
Gets a collection IDeviceUpdateTrigger registered to this device provider.
Declaration
IReadOnlyList<(int id, IDeviceUpdateTrigger trigger)> UpdateTriggers { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<(int id, IDeviceUpdateTrigger trigger)> |
Methods
| Edit this page View SourceInitialize(RGBDeviceType, bool)
Initializes the device provider and loads available devices.
Declaration
bool Initialize(RGBDeviceType loadFilter = (RGBDeviceType)-1, bool throwExceptions = false)
Parameters
Type | Name | Description |
---|---|---|
RGBDeviceType | loadFilter | RGBDeviceType-flags to filter the devices to load. |
bool | throwExceptions | Specifies if exceptions should be thrown or silently be ignored. |
Returns
Type | Description |
---|---|
bool |
|
Events
| Edit this page View SourceDevicesChanged
Occures when the devices provided by this device provider changed.
Declaration
event EventHandler<DevicesChangedEventArgs>? DevicesChanged
Event Type
Type | Description |
---|---|
EventHandler<DevicesChangedEventArgs> |
Exception
Occurs when an exception is thrown in the device provider.
Declaration
event EventHandler<ExceptionEventArgs>? Exception
Event Type
Type | Description |
---|---|
EventHandler<ExceptionEventArgs> |