using RGB.NET.Core;
using OpenRGBDevice = OpenRGB.NET.Device;
namespace RGB.NET.Devices.OpenRGB;
///
/// Represents generic information for an OpenRGB Device
///
public class OpenRGBDeviceInfo : IRGBDeviceInfo
{
#region Properties & Fields
///
public RGBDeviceType DeviceType { get; }
///
public string DeviceName { get; }
///
public string Manufacturer { get; }
///
public string Model { get; }
///
public object? LayoutMetadata { get; set; }
///
/// Gets the OpenRGB device.
///
public OpenRGBDevice OpenRGBDevice { get; }
#endregion
#region Constructors
///
/// Initializes a new instance of .
///
/// The OpenRGB device to extract information from.
internal OpenRGBDeviceInfo(OpenRGBDevice openRGBDevice)
{
this.OpenRGBDevice = openRGBDevice;
DeviceType = Helper.GetRgbNetDeviceType(openRGBDevice.Type);
Manufacturer = Helper.GetVendorName(openRGBDevice);
Model = Helper.GetModelName(openRGBDevice);
DeviceName = DeviceHelper.CreateDeviceName(Manufacturer, Model);
}
#endregion
}