fix: IBehaviour.GetBehaviours<T>(List)
This commit is contained in:
@@ -95,15 +95,15 @@ public class BehaviourController : IBehaviourController
|
||||
return behaviours ?? Enumerable.Empty<T>().ToList();
|
||||
}
|
||||
|
||||
public void GetBehaviours<T>(List<T> behaviors)
|
||||
public void GetBehaviours<T>(IList<T> results)
|
||||
{
|
||||
behaviors.Clear();
|
||||
results.Clear();
|
||||
foreach (var behaviourItem in behaviours)
|
||||
{
|
||||
if (behaviourItem is not T _)
|
||||
if (behaviourItem is not T behaviour)
|
||||
continue;
|
||||
|
||||
behaviours.Add(behaviourItem);
|
||||
results.Add(behaviour);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user