1
0
mirror of https://github.com/DarthAffe/RGB.NET.git synced 2025-12-12 17:48:31 +00:00

Changed IReadOnlyCollections to IReadOnlyLists

This commit is contained in:
Darth Affe 2021-09-06 01:12:36 +02:00
parent ef3998055d
commit ef12e402ea
5 changed files with 6 additions and 7 deletions

View File

@ -14,7 +14,7 @@ namespace RGB.NET.Core
private readonly List<T> _decorators = new();
/// <inheritdoc />
public IReadOnlyCollection<T> Decorators { get; }
public IReadOnlyList<T> Decorators { get; }
#endregion

View File

@ -20,7 +20,7 @@ namespace RGB.NET.Core
/// <summary>
/// Gets a readonly-list of all <see cref="IDecorator"/> attached to this <see cref="IDecoratable{T}"/>.
/// </summary>
IReadOnlyCollection<T> Decorators { get; }
IReadOnlyList<T> Decorators { get; }
/// <summary>
/// Adds an <see cref="IDecorator"/> to the <see cref="IDecoratable"/>.

View File

@ -30,7 +30,7 @@ namespace RGB.NET.Core
protected Dictionary<int, IDeviceUpdateTrigger> UpdateTriggerMapping { get; } = new();
/// <inheritdoc />
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

View File

@ -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
/// <summary>
/// Gets a collection <see cref="IDeviceUpdateTrigger"/> registered to this device provider.
/// </summary>
ReadOnlyCollection<(int id, IDeviceUpdateTrigger trigger)> UpdateTriggers { get; }
IReadOnlyList<(int id, IDeviceUpdateTrigger trigger)> UpdateTriggers { get; }
#endregion

View File

@ -27,12 +27,12 @@ namespace RGB.NET.Core
/// <summary>
/// Gets a readonly list containing all loaded <see cref="IRGBDevice"/>.
/// </summary>
public IReadOnlyCollection<IRGBDevice> Devices { get; }
public IReadOnlyList<IRGBDevice> Devices { get; }
/// <summary>
/// Gets a readonly list containing all registered <see cref="IUpdateTrigger"/>.
/// </summary>
public IReadOnlyCollection<IUpdateTrigger> UpdateTriggers { get; }
public IReadOnlyList<IUpdateTrigger> UpdateTriggers { get; }
/// <summary>
/// Gets a copy of the <see cref="Rectangle"/> representing this <see cref="RGBSurface"/>.