示例#1
0
        public override void AttachObserver(IObserver observer)
        {
            var items = orderedItems.GetAll();

            for (int i = 0; i < items.Count(); i++)
            {
                Plate plate = (Plate)items.ElementAt(i);
                plate.AttachObserver(observer);
            }
        }
示例#2
0
 public override void notifyObservers()
 {
     foreach (IObserver observer in observers.GetAll())
     {
         observer.update(plateObservable);
     }
 }
示例#3
0
        public void TestNumberOfElements()
        {
            var numberOfElements = array.GetAll().Count;

            Assert.AreEqual(3, numberOfElements);
        }