refactor: IBehaviourController.GetBehaviours return value replaced with IReadOnlyList
This commit is contained in:
parent
86b8cd9b55
commit
2e2306c5bb
@ -60,7 +60,7 @@ public interface IBehaviourController : IInitializable, IHasHierarchyObject, IEn
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <typeparam name="T">The type of <see cref="IBehaviour"/>s to get.</typeparam>
|
/// <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>
|
/// <returns>A list of <see cref="IBehaviour"/>s of the specified type.</returns>
|
||||||
IList<T> GetBehaviours<T>();
|
IReadOnlyList<T> GetBehaviours<T>();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets all <see cref="IBehaviour"/>s of the specified type and stores them in the provided list.
|
/// Gets all <see cref="IBehaviour"/>s of the specified type and stores them in the provided list.
|
||||||
|
@ -72,7 +72,7 @@ public class BehaviourController : IBehaviourController
|
|||||||
return default;
|
return default;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IList<T> GetBehaviours<T>()
|
public IReadOnlyList<T> GetBehaviours<T>()
|
||||||
{
|
{
|
||||||
List<T>? behaviours = null;
|
List<T>? behaviours = null;
|
||||||
foreach (IBehaviour behaviourItem in this.behaviours)
|
foreach (IBehaviour behaviourItem in this.behaviours)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user