Exemple #1
0
 public override string Handle(Menagerie m)
 {
     if (m.GetAnimals().Count == 0)
     {
         return("No animals in the menagerie");
     }
     else
     {
         return(Successor.Handle(m));
     }
 }
Exemple #2
0
 public override string Handle(Menagerie m)
 {
     if (m.IsNight)
     {
         return("Shhh... It's the night");
     }
     else
     {
         return(Successor.Handle(m));
     }
 }
Exemple #3
0
 public override string Handle(Menagerie m)
 {
     return(m.GetAnimals()
            .Select(a => a.SaySomething())
            .Aggregate((s1, s2) => s1 + Environment.NewLine + s2));
 }
Exemple #4
0
 public abstract string Handle(Menagerie m);