refactor: IBehaviourController.GetBehaviours return value replaced with IReadOnlyList

This commit is contained in:
Syntriax 2025-04-13 12:53:55 +03:00
parent 86b8cd9b55
commit 2e2306c5bb
2 changed files with 2 additions and 2 deletions

View File

@ -60,7 +60,7 @@ public interface IBehaviourController : IInitializable, IHasHierarchyObject, IEn
/// </summary>
/// <typeparam name="T">The type of <see cref="IBehaviour"/>s to get.</typeparam>
/// <returns>A list of <see cref="IBehaviour"/>s of the specified type.</returns>
IList<T> GetBehaviours<T>();
IReadOnlyList<T> GetBehaviours<T>();
/// <summary>
/// Gets all <see cref="IBehaviour"/>s of the specified type and stores them in the provided list.

View File

@ -72,7 +72,7 @@ public class BehaviourController : IBehaviourController
return default;
}
public IList<T> GetBehaviours<T>()
public IReadOnlyList<T> GetBehaviours<T>()
{
List<T>? behaviours = null;
foreach (IBehaviour behaviourItem in this.behaviours)