Example #1
0
 public void Accept(Visitor visitor)
 {
     foreach (House house in houses)
     {
         house.Accept(visitor);
     }
 }
Example #2
0
 public override void Accept(Visitor visitor)
 {
     if (CheckTrolle(visitor))
     {
         Console.WriteLine("Trolle don't entry in GirlsHouse!");
         return;
     }
     visitor.VisitGirlsHouse(this);
 }
Example #3
0
 public abstract void Accept(Visitor visitor);
Example #4
0
 private static bool CheckTrolle(Visitor visitor)
 {
     return visitor is Trolle;
 }