// void UnitTest() { ObjectStructure theStructure = new ObjectStructure(); // 将Vicitor走访ObjectStructure裡的各元表 theStructure.RunVisitor(new ConcreteVicitor1()); theStructure.RunVisitor(new ConcreteVicitor2()); }
void Start() { ObjectStructure structure = new ObjectStructure(); structure.RunVisitor(new ConcreteVicitor()); }