From ef12e402eaf53c4fbc6547db87a46adcac4e8323 Mon Sep 17 00:00:00 2001 From: Darth Affe Date: Mon, 6 Sep 2021 01:12:36 +0200 Subject: [PATCH] Changed IReadOnlyCollections to IReadOnlyLists --- RGB.NET.Core/Decorators/AbstractDecorateable.cs | 2 +- RGB.NET.Core/Decorators/IDecoratable.cs | 2 +- RGB.NET.Core/Devices/AbstractRGBDeviceProvider.cs | 2 +- RGB.NET.Core/Devices/IRGBDeviceProvider.cs | 3 +-- RGB.NET.Core/RGBSurface.cs | 4 ++-- 5 files changed, 6 insertions(+), 7 deletions(-) diff --git a/RGB.NET.Core/Decorators/AbstractDecorateable.cs b/RGB.NET.Core/Decorators/AbstractDecorateable.cs index 50602ae..1120bc4 100644 --- a/RGB.NET.Core/Decorators/AbstractDecorateable.cs +++ b/RGB.NET.Core/Decorators/AbstractDecorateable.cs @@ -14,7 +14,7 @@ namespace RGB.NET.Core private readonly List _decorators = new(); /// - public IReadOnlyCollection Decorators { get; } + public IReadOnlyList Decorators { get; } #endregion diff --git a/RGB.NET.Core/Decorators/IDecoratable.cs b/RGB.NET.Core/Decorators/IDecoratable.cs index 2892638..ae8def2 100644 --- a/RGB.NET.Core/Decorators/IDecoratable.cs +++ b/RGB.NET.Core/Decorators/IDecoratable.cs @@ -20,7 +20,7 @@ namespace RGB.NET.Core /// /// Gets a readonly-list of all attached to this . /// - IReadOnlyCollection Decorators { get; } + IReadOnlyList Decorators { get; } /// /// Adds an to the . diff --git a/RGB.NET.Core/Devices/AbstractRGBDeviceProvider.cs b/RGB.NET.Core/Devices/AbstractRGBDeviceProvider.cs index 81ac6f2..6b4ee57 100644 --- a/RGB.NET.Core/Devices/AbstractRGBDeviceProvider.cs +++ b/RGB.NET.Core/Devices/AbstractRGBDeviceProvider.cs @@ -30,7 +30,7 @@ namespace RGB.NET.Core protected Dictionary UpdateTriggerMapping { get; } = new(); /// - public ReadOnlyCollection<(int id, IDeviceUpdateTrigger trigger)> UpdateTriggers => new(UpdateTriggerMapping.Select(x => (x.Key, x.Value)).ToList()); + public IReadOnlyList<(int id, IDeviceUpdateTrigger trigger)> UpdateTriggers => new ReadOnlyCollection<(int id, IDeviceUpdateTrigger trigger)>(UpdateTriggerMapping.Select(x => (x.Key, x.Value)).ToList()); #endregion diff --git a/RGB.NET.Core/Devices/IRGBDeviceProvider.cs b/RGB.NET.Core/Devices/IRGBDeviceProvider.cs index d2a8d1d..1193a65 100644 --- a/RGB.NET.Core/Devices/IRGBDeviceProvider.cs +++ b/RGB.NET.Core/Devices/IRGBDeviceProvider.cs @@ -2,7 +2,6 @@ using System; using System.Collections.Generic; -using System.Collections.ObjectModel; namespace RGB.NET.Core { @@ -31,7 +30,7 @@ namespace RGB.NET.Core /// /// Gets a collection registered to this device provider. /// - ReadOnlyCollection<(int id, IDeviceUpdateTrigger trigger)> UpdateTriggers { get; } + IReadOnlyList<(int id, IDeviceUpdateTrigger trigger)> UpdateTriggers { get; } #endregion diff --git a/RGB.NET.Core/RGBSurface.cs b/RGB.NET.Core/RGBSurface.cs index f39ddc3..b51766d 100644 --- a/RGB.NET.Core/RGBSurface.cs +++ b/RGB.NET.Core/RGBSurface.cs @@ -27,12 +27,12 @@ namespace RGB.NET.Core /// /// Gets a readonly list containing all loaded . /// - public IReadOnlyCollection Devices { get; } + public IReadOnlyList Devices { get; } /// /// Gets a readonly list containing all registered . /// - public IReadOnlyCollection UpdateTriggers { get; } + public IReadOnlyList UpdateTriggers { get; } /// /// Gets a copy of the representing this .