Refactoring

This commit is contained in:
DarthAffe committed 2021-02-06 17:07:41 +01:00
1 parent a0a1521658
commit 6a4ebb3d2a
37 files changed
+123 -300

No files matched your search

@@ -1,5 +1,4 @@
using System;
using RGB.NET.Core;
using RGB.NET.Core;
namespace RGB.NET.Devices.Novation
{
@@ -59,7 +59,7 @@ namespace RGB.NET.Devices.Novation
#region Methods
/// <inheritdoc />
public bool Initialize(RGBDeviceType loadFilter = RGBDeviceType.All, bool exclusiveAccessIfPossible = false, bool throwExceptions = false)
public bool Initialize(RGBDeviceType loadFilter = RGBDeviceType.All, bool throwExceptions = false)
{
IsInitialized = false;
@@ -106,22 +106,17 @@ namespace RGB.NET.Devices.Novation
return true;
}
/// <inheritdoc />
public void ResetDevices()
{
foreach (IRGBDevice device in Devices)
{
NovationLaunchpadRGBDevice? novationDevice = device as NovationLaunchpadRGBDevice;
novationDevice?.Reset();
}
}
/// <inheritdoc />
public void Dispose()
{
try { UpdateTrigger.Dispose(); }
catch { /* at least we tried */ }
foreach (IRGBDevice device in Devices)
try { device.Dispose(); }
catch { /* at least we tried */ }
Devices = Enumerable.Empty<IRGBDevice>();
}
#endregion