Plugins - Load features by their info before enabling plugins

General - Added missing XML comments
This commit is contained in:
Robert committed 2021-03-10 20:53:37 +01:00
1 parent fa26e6b7da
commit d5d1211649
24 files changed
+241 -180

No files matched your search

@@ -21,6 +21,7 @@ namespace Artemis.Core
internal ArtemisDevice(IRGBDevice rgbDevice, DeviceProvider deviceProvider)
{
Identifier = rgbDevice.GetDeviceIdentifier();
DeviceEntity = new DeviceEntity();
RgbDevice = rgbDevice;
DeviceProvider = deviceProvider;
@@ -45,6 +46,7 @@ namespace Artemis.Core
internal ArtemisDevice(IRGBDevice rgbDevice, DeviceProvider deviceProvider, DeviceEntity deviceEntity)
{
Identifier = rgbDevice.GetDeviceIdentifier();
DeviceEntity = deviceEntity;
RgbDevice = rgbDevice;
DeviceProvider = deviceProvider;
@@ -59,6 +61,11 @@ namespace Artemis.Core
ApplyKeyboardLayout();
}
/// <summary>
/// Gets the (hopefully unique and persistent) ID of this device
/// </summary>
public string Identifier { get; }
/// <summary>
/// Gets the rectangle covering the device
/// </summary>
@@ -336,7 +343,7 @@ namespace Artemis.Core
internal void ApplyToEntity()
{
// Other properties are computed
DeviceEntity.Id = RgbDevice.GetDeviceIdentifier();
DeviceEntity.Id = Identifier;
DeviceEntity.InputIdentifiers.Clear();
foreach (ArtemisDeviceInputIdentifier identifier in InputIdentifiers)
@@ -46,6 +46,9 @@ namespace Artemis.Core
private set => SetAndNotify(ref _absoluteRectangle, value);
}
/// <summary>
/// Gets the layout applied to this LED
/// </summary>
public ArtemisLedLayout? Layout { get; internal set; }
/// <inheritdoc />
@@ -53,7 +56,7 @@ namespace Artemis.Core
{
return RgbLed.ToString();
}
internal void CalculateRectangles()
{
Rectangle = RgbLed.Boundary.ToSKRect();
@@ -5,6 +5,9 @@ using RGB.NET.Layout;
namespace Artemis.Core
{
/// <summary>
/// Represents a LED layout decorated with extra Artemis-specific data
/// </summary>
public class ArtemisLedLayout
{
internal ArtemisLedLayout(ArtemisLayout deviceLayout, ILedLayout led)