示例#1
0
 /// <summary>
 /// 接收一个访问者,使所有的Element都执行这个动作
 /// </summary>
 /// <param name="visitor"></param>
 public void Accept(Visitor visitor)
 {
     foreach (var item in _list)
     {
         item.Accept(visitor);
     }
 }
示例#2
0
 public override void Accept(Visitor visitor)
 {
     visitor.CallByElementB(this);
     Console.WriteLine();
 }
示例#3
0
 public abstract void Accept(Visitor visitor);