refactor: IBehaviourController.TryGetBehaviour to Extension Method

This commit is contained in:
2024-11-24 11:34:36 +03:00
parent 1b3f40be5f
commit 4416f64287
4 changed files with 47 additions and 15 deletions

View File

@@ -74,12 +74,6 @@ public class BehaviourController : IBehaviourController
return default;
}
public bool TryGetBehaviour<T>([NotNullWhen(returnValue: true)] out T? behaviour)
{
behaviour = GetBehaviour<T>();
return behaviour is not null;
}
public IList<T> GetBehaviours<T>()
{
List<T>? behaviours = null;