From 37426ef413e788a3219cf79ef11322348e62d126 Mon Sep 17 00:00:00 2001 From: SpoinkyNL Date: Sat, 1 Aug 2020 18:57:24 +0200 Subject: [PATCH 1/2] Include Layout path in Debug RGB device --- RGB.NET.Devices.Debug/DebugRGBDevice.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/RGB.NET.Devices.Debug/DebugRGBDevice.cs b/RGB.NET.Devices.Debug/DebugRGBDevice.cs index 2ed6700..c63e3e8 100644 --- a/RGB.NET.Devices.Debug/DebugRGBDevice.cs +++ b/RGB.NET.Devices.Debug/DebugRGBDevice.cs @@ -16,6 +16,11 @@ namespace RGB.NET.Devices.Debug /// public override DebugRGBDeviceInfo DeviceInfo { get; } + /// + /// Gets the path used to mock this + /// + public string LayoutPath { get; } + private Func> _syncBackFunc; private Action> _updateLedsAction; @@ -32,6 +37,7 @@ namespace RGB.NET.Devices.Debug DeviceLayout layout = DeviceLayout.Load(layoutPath); DeviceInfo = new DebugRGBDeviceInfo(layout.Type, layout.Vendor, layout.Model, layout.Lighting, syncBackFunc != null); + LayoutPath = layoutPath; } #endregion From 0c5d0fe7354eb2bd94f840cbe04c165a8f4e2e52 Mon Sep 17 00:00:00 2001 From: DarthAffe Date: Mon, 3 Aug 2020 00:05:31 +0200 Subject: [PATCH 2/2] Small coding style adjustment --- RGB.NET.Devices.Debug/DebugRGBDevice.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RGB.NET.Devices.Debug/DebugRGBDevice.cs b/RGB.NET.Devices.Debug/DebugRGBDevice.cs index c63e3e8..174e7fd 100644 --- a/RGB.NET.Devices.Debug/DebugRGBDevice.cs +++ b/RGB.NET.Devices.Debug/DebugRGBDevice.cs @@ -17,7 +17,7 @@ namespace RGB.NET.Devices.Debug public override DebugRGBDeviceInfo DeviceInfo { get; } /// - /// Gets the path used to mock this + /// Gets the path of the layout used to mock this /// public string LayoutPath { get; } @@ -32,12 +32,12 @@ namespace RGB.NET.Devices.Debug /// internal DebugRGBDevice(string layoutPath, Func> syncBackFunc = null, Action> updateLedsAction = null) { + this.LayoutPath = layoutPath; this._syncBackFunc = syncBackFunc; this._updateLedsAction = updateLedsAction; DeviceLayout layout = DeviceLayout.Load(layoutPath); DeviceInfo = new DebugRGBDeviceInfo(layout.Type, layout.Vendor, layout.Model, layout.Lighting, syncBackFunc != null); - LayoutPath = layoutPath; } #endregion