Пример #1
0
 private static void TestCommand()
 {
     Receiver receiver = new Receiver();
     ICommand command = new ConcreteCommand(receiver);
     Invoker invoker = new Invoker(command);
     invoker.ExecuteCommand();
 }
Пример #2
0
 public void CommandExample()
 {
     Receiver receiver = new Receiver();
     ACommand command = new ConcreteCommand(receiver);
     Invoker invoker = new Invoker();
     invoker.SetCommand(command);
     invoker.ExecuteCommand();
 }
Пример #3
0
 public ConcreteCommand(Receiver receiver)
     : base(receiver)
 {
 }
Пример #4
0
 public ACommand(Receiver receiver)
 {
     this.receiver = receiver;
 }
Пример #5
0
 public ConcreteCommand(Receiver r)
 {
     receiver = r;
 }
Пример #6
0
 public ComplexCommand(Receiver receiver, string a, string b)
 {
     _receiver = receiver;
     _a        = a;
     _b        = b;
 }
Пример #7
0
 public ConcreteCommand(Receiver receiver)
 {
     _receiver = receiver;
 }