public void Run() { Receiver receiver = new Receiver(); Command cmd = new ConcreteCommand(receiver, "Hello World"); Invoker invoker = new Invoker(); invoker.StoreCommand(cmd); invoker.Invoke(); invoker.UndoInvoke(); }
public ConcreteCommand(Receiver receiver, string state) { _receiver = receiver; _state = state; }