예제 #1
0
        public void Go()
        {
            Element eleA = new ElementA();
            Visitor v    = new VisitorOtherImpl();

            eleA.Accept(v);

            Element eleB = new ElementB();

            eleB.Accept(v);
        }
예제 #2
0
 public virtual void Visit(ElementA element)
 {
     Console.WriteLine("Base visit A");
 }
예제 #3
0
 public override void Visit(ElementA element)
 {
     Console.WriteLine("Impl visitor A");
     base.Visit(element);
 }