예제 #1
0
    //
    void UnitTest()
    {
        ObjectStructure theStructure = new ObjectStructure();

        // 将Vicitor走访ObjectStructure裡的各元表
        theStructure.RunVisitor(new ConcreteVicitor1());
        theStructure.RunVisitor(new ConcreteVicitor2());
    }
예제 #2
0
    void Start()
    {
        ObjectStructure structure = new ObjectStructure();

        structure.RunVisitor(new ConcreteVicitor());
    }