Class OpenRGBDeviceProvider
Represents the abstract base implementation for a IRGBDeviceProvider.
Inherited Members
Namespace: RGB.NET.Devices.OpenRGB
Assembly: RGB.NET.Devices.OpenRGB.dll
Syntax
public sealed class OpenRGBDeviceProvider : AbstractRGBDeviceProvider, IRGBDeviceProvider, IDisposable
Constructors
| Edit this page View SourceOpenRGBDeviceProvider()
Initializes a new instance of the OpenRGBDeviceProvider class.
Declaration
public OpenRGBDeviceProvider()
Exceptions
| Type | Condition |
|---|---|
| InvalidOperationException | Thrown if this constructor is called even if there is already an instance of this class. |
Properties
| Edit this page View SourceDeviceDefinitions
Gets a list of all defined device-definitions.
Declaration
public List<OpenRGBServerDefinition> DeviceDefinitions { get; }
Property Value
| Type | Description |
|---|---|
| List<OpenRGBServerDefinition> |
ForceAddAllDevices
Indicates whether all devices will be added, or just the ones with a 'Direct' mode. Defaults to false.
Declaration
public bool ForceAddAllDevices { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Instance
Gets the singleton OpenRGBDeviceProvider instance.
Declaration
public static OpenRGBDeviceProvider Instance { get; }
Property Value
| Type | Description |
|---|---|
| OpenRGBDeviceProvider |
PerZoneDeviceFlag
Declaration
public RGBDeviceType PerZoneDeviceFlag { get; }
Property Value
| Type | Description |
|---|---|
| RGBDeviceType |
Methods
| Edit this page View SourceAddDeviceDefinition(OpenRGBServerDefinition)
Adds the specified OpenRGBServerDefinition to this device-provider.
Declaration
public void AddDeviceDefinition(OpenRGBServerDefinition deviceDefinition)
Parameters
| Type | Name | Description |
|---|---|---|
| OpenRGBServerDefinition | deviceDefinition | The OpenRGBServerDefinition to add. |
Dispose(bool)
Disposes the object and frees all resources.
Declaration
protected override void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | disposing |
|
Overrides
| Edit this page View SourceInitializeSDK()
Initializes the underlying SDK.
Declaration
protected override void InitializeSDK()
Overrides
| Edit this page View SourceLoadDevices()
Loads all devices this device provider is capable of loading.
Declaration
protected override IEnumerable<IRGBDevice> LoadDevices()
Returns
| Type | Description |
|---|---|
| IEnumerable<IRGBDevice> | A collection of loaded devices. |
Overrides
Remarks
Filtering happens in GetLoadedDevices(RGBDeviceType).