示例#1
0
        public void Quack()
        {
            var enumerator = quackables.GetEnumerator();

            while (enumerator.MoveNext())
            {
                Quackable quackable = enumerator.Current;
                quackable.Quack();
            }
        }
 public void Quack()
 {
     duck.Quack();
     numberOfQuacks++;
     NotifyObservers();
 }
示例#3
0
        public void Quack()
        {
            duckObservable.Quack();

            _quackCounter++;
        }
示例#4
0
 static void Simulator(Quackable duck)
 {
     duck.Quack();
 }
示例#5
0
 void Simulate(Quackable duck)
 {
     duck.Quack();
 }
示例#6
0
 void Simulate(Quackable duck)
 {
     duck.Quack();
 }