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