protected void ExecuteObservers <TObserver>(Action <TObserver> callback) { foreach (var observer in Observers.OfType <TObserver>()) { callback(observer); } }
public V[] GetObservers <V>() where V : IObserveComponent <T> { if (!isInitialized) { Debug.LogAssertion(NotYetObservingMessage); } return(Observers.OfType <V>().ToArray()); }
protected bool ExecuteCancellableObservers <TObserver>(Func <TObserver, bool> callback) { return(Observers.OfType <TObserver>().All(callback)); }