Exemplo n.º 1
0
    void Start()
    {
        DMInvoker invoker = new DMInvoker();

        ConcreteCommand1 cmd1 = new ConcreteCommand1(new DMReceiver1());

        invoker.AddCommand(cmd1);
        invoker.AddCommand(cmd1);

        invoker.ExecuteCommand();
    }
Exemplo n.º 2
0
    void Start()
    {
        DMInvoker         invoker   = new DMInvoker();
        DMReceiver1       receiver1 = new DMReceiver1();
        ConcreateCommand1 command   = new ConcreateCommand1(receiver1);

        invoker.AddCommand(command);
        invoker.InvokeCommand();
    }