예제 #1
0
 public void Fly()
 {
     foreach (var index in Enumerable.Range(0, 5))
     {
         turkey.Fly();
     }
 }
 public void Fly()
 {
     for (int i = 0; i < 3; i++)
     {
         _iTurkey.Fly();
     }
 }
예제 #3
0
        private static void Tester(ITurkey turkey)
        {
            Console.WriteLine("Here the method called is Gobble that belongs to Turkey \n");

            turkey.Fly();
            turkey.Gobble();
        }
 public void Fly()
 {
     for (int i = 0; i < 5; i++)
     {
         _turkey.Fly(); // to fly like a duck
     }
 }
예제 #5
0
 public override void Fly()
 {
     for (int i = 0; i < 5; i++)
     {
         _turkey.Fly();
     }
 }
예제 #6
0
 public void Fly()
 {
     for (int i = 0; i < 5; i++)
     {
         _turkey.Fly();
     }
 }
 public void Fly()
 {
     // need to compensate because turkeys are only flying short distance
     for (int i = 0; i < 5; i++)
     {
         _turkey.Fly();
     }
 }
예제 #8
0
 public void Fly()
 {
     for (var i = 0; i < 5; i++)
     {
         turkey.Fly();
         Console.WriteLine("Почива..");
     }
 }
예제 #9
0
 public void Fly()
 {
     for (var i = 0; i < 5; i++)
     {
         _turkey.Fly();
         Console.WriteLine("Resting..");
     }
 }
 public void Fly()
 {
     // To match the duck fly range.
     // make turkey fly 5 times
     for (int i = 0; i < 5; ++i)
     {
         _turkey.Fly();
     }
 }
예제 #11
0
 public void Fly()
 {
     // Индюшка не умеет летать на дальние расстояния, поэтому заставляем
     // ее лететь 5 раз (чтобы привести в соответствие с IDuck)
     for (int i = 0; i < 5; i++)
     {
         _turkey.Fly();
     }
 }
 public void Fly()
 {
     // Turkey's don't fly as far so we need
     // to change the behavior a bit.
     for (int i = 0; i < 5; i++)
     {
         _turkey.Fly();
     }
 }
예제 #13
0
        public string Fly()
        {
            StringBuilder sb = new StringBuilder();

            for (int i = 0; i < 5; i++)
            {
                sb.AppendLine(_turkey.Fly());
            }
            return(sb.ToString());
        }
예제 #14
0
 public static void TurkeyClient(ITurkey turkey)
 {
     Console.WriteLine(turkey.Gobble());
     Console.WriteLine(turkey.Fly());
 }
예제 #15
0
 public void Fly()
 {
     _turkey.Fly();
 }
예제 #16
0
 public static void TestTurkey(ITurkey t)
 {
     t.Gobble();
     t.Fly();
 }
예제 #17
0
 public void DuckFly()
 {
     _turkey.Fly();
 }
예제 #18
0
 private static void TestTurkey(ITurkey turkey)
 {
     turkey.Gobble();
     turkey.Fly();
 }
예제 #19
0
 static void TestDuck(ITurkey turkeyInterface)
 {
     turkeyInterface.Gobble();
     turkeyInterface.Fly();
 }
 public string Fly()
 {
     return(_turkey.Fly());
 }
예제 #21
0
 static void TestTurkey(ITurkey turkey)
 {
     turkey.Bubble();
     turkey.Fly();
 }
예제 #22
0
 static void TestTurkey(ITurkey turkey)
 {
     turkey.Gobble();
     turkey.Fly();
 }