Example #1
0
 public void Visit(ConcreteComponentA s1Component)
 {
     Console.WriteLine($"Hello, I'm {this.GetType().Name} and now "
                       + $"I'm working with {s1Component.GetType().Name}.");
     s1Component.ShowYourself();
 }
Example #2
0
 public void VisitConcreteComponentA(ConcreteComponentA element)
 {
     Console.WriteLine(element.ExclusiveMethodOfConcreteComponentA() + " + ConcreteVisitor2");
 }