Пример #1
0
 public void ThinkAloud()
 {
     Console.WriteLine("Three injection methods!");
     if (PAnimal != null)
     {
         PAnimal.Say();
     }
     if (CAnimal != null)
     {
         CAnimal.Say();
     }
     if (MAnimal != null)
     {
         MAnimal.Say();
     }
     Console.WriteLine("Injiection array");
     if (Animals != null && Animals.Length > 0)
     {
         Animals.ToList().ForEach(it => it.Say());
     }
     Console.WriteLine("Injiection array with diferent methods");
     if (FeederNames != null && FeederNames.Length > 0)
     {
         FeederNames.ToList().ForEach(it => Console.WriteLine(it));
     }
     Console.WriteLine("Injection array null");
     if (PetNames != null && PetNames.Length > 0)
     {
         PetNames.ToList().ForEach(it => Console.WriteLine(it));
     }
 }