public void registerObserver(Observer observer) { var enumerator = quackers.GetEnumerator(); while (enumerator.MoveNext()) { Quackable duck = enumerator.Current; duck.registerObserver(observer); } }
public void registerObserver(Observer observer) { //foarte important as parcurgem si sa face inregistrare la fiecare in parte IEnumerator <Quackable> enumerable = quackers.GetEnumerator(); while (enumerable.MoveNext()) { Quackable quacker = enumerable.Current; quacker.registerObserver(observer); } }
public void registerObserver(Observer observer) { duck.registerObserver(observer); }
public void registerObserver(Observer observer) { duck.registerObserver(observer); //important , se ajunge mai intai la decorator si dupa la obiectul efectiv }