Example #1
0
        public static void Main(string[] args)
        {
            ConcreteVisitor  visitor          = new ConcreteVisitor();
            ConcreteElement1 concreteElement1 = new ConcreteElement1();

            concreteElement1.accept(visitor);
            ConcreteElement2 concreteElement2 = new ConcreteElement2();

            concreteElement2.accept(visitor);
        }
Example #2
0
 public void apply(ConcreteElement1 concreteElement1)
 {
     Console.WriteLine("Applying on " + nameof(concreteElement1));
 }