This commit is contained in:
DarthAffe committed 2021-11-13 17:57:09 +01:00
commit f69560224d
12 files changed
+1510 -1554

No files matched your search

@@ -1,54 +1,59 @@
using RGB.NET.Core;
using RGB.NET.Devices.Wooting.Enum;
using RGB.NET.Devices.Wooting.Helper;
using RGB.NET.Devices.Wooting.Native;
namespace RGB.NET.Devices.Wooting.Generic;
/// <inheritdoc />
/// <summary>
/// Represents a generic information for a Wooting-<see cref="T:RGB.NET.Core.IRGBDevice" />.
/// </summary>
public class WootingRGBDeviceInfo : IRGBDeviceInfo
namespace RGB.NET.Devices.Wooting.Generic
{
#region Properties & Fields
/// <inheritdoc />
public RGBDeviceType DeviceType { get; }
/// <inheritdoc />
public string DeviceName { get; }
/// <inheritdoc />
public string Manufacturer => "Wooting";
/// <inheritdoc />
public string Model { get; }
/// <inheritdoc />
public object? LayoutMetadata { get; set; }
/// <summary>
/// Gets the <see cref="WootingDeviceType"/> of the <see cref="WootingRGBDevice{TDeviceInfo}"/>.
/// Represents a generic information for a Wooting-<see cref="T:RGB.NET.Core.IRGBDevice" />.
/// </summary>
public WootingDeviceType WootingDeviceType { get; }
#endregion
#region Constructors
/// <summary>
/// Internal constructor of managed <see cref="WootingRGBDeviceInfo"/>.
/// </summary>
/// <param name="deviceType">The type of the <see cref="IRGBDevice"/>.</param>
/// <param name="deviceInfo">The <see cref="_WootingDeviceInfo"/> of the <see cref="IRGBDevice"/>.</param>
internal WootingRGBDeviceInfo(RGBDeviceType deviceType, _WootingDeviceInfo deviceInfo)
public class WootingRGBDeviceInfo : IRGBDeviceInfo
{
this.DeviceType = deviceType;
this.WootingDeviceType = deviceInfo.DeviceType;
#region Properties & Fields
Model = deviceInfo.Model;
DeviceName = DeviceHelper.CreateDeviceName(Manufacturer, Model);
/// <inheritdoc />
public RGBDeviceType DeviceType { get; }
/// <inheritdoc />
public string DeviceName { get; }
/// <inheritdoc />
public string Manufacturer => "Wooting";
/// <inheritdoc />
public string Model { get; }
/// <inheritdoc />
public object? LayoutMetadata { get; set; }
/// <summary>
/// Gets the <see cref="WootingDeviceType"/> of the <see cref="WootingRGBDevice{TDeviceInfo}"/>.
/// </summary>
public WootingDeviceType WootingDeviceType { get; }
public WootingLayoutType WootingLayoutType { get; }
#endregion
#region Constructors
/// <summary>
/// Internal constructor of managed <see cref="WootingRGBDeviceInfo"/>.
/// </summary>
/// <param name="deviceType">The type of the <see cref="IRGBDevice"/>.</param>
/// <param name="deviceInfo">The <see cref="_WootingDeviceInfo"/> of the <see cref="IRGBDevice"/>.</param>
internal WootingRGBDeviceInfo(RGBDeviceType deviceType, _WootingDeviceInfo deviceInfo)
{
this.DeviceType = deviceType;
this.WootingDeviceType = deviceInfo.DeviceType;
this.WootingLayoutType = deviceInfo.LayoutType;
Model = deviceInfo.Model;
DeviceName = DeviceHelper.CreateDeviceName(Manufacturer, Model);
}
#endregion
}
#endregion
}
}