private static void TestCommand() { Receiver receiver = new Receiver(); ICommand command = new ConcreteCommand(receiver); Invoker invoker = new Invoker(command); invoker.ExecuteCommand(); }
public void CommandExample() { Receiver receiver = new Receiver(); ACommand command = new ConcreteCommand(receiver); Invoker invoker = new Invoker(); invoker.SetCommand(command); invoker.ExecuteCommand(); }
public ConcreteCommand(Receiver receiver) : base(receiver) { }
public ACommand(Receiver receiver) { this.receiver = receiver; }
public ConcreteCommand(Receiver r) { receiver = r; }
public ComplexCommand(Receiver receiver, string a, string b) { _receiver = receiver; _a = a; _b = b; }
public ConcreteCommand(Receiver receiver) { _receiver = receiver; }