Esempio n. 1
0
 public DeleteCommand(Receiver receiver)
 {
     _receiver = receiver;
 }
Esempio n. 2
0
 public UpdateCommand(Receiver receiver)
 {
     _receiver = receiver;
 }
Esempio n. 3
0
        static void Main(string[] args)
        {
            Console.Title = "Command Pattern Demo";
            Receiver rec = new Receiver();
            ICommand insert = new InsertCommand(rec);
            ICommand update = new UpdateCommand(rec);
            ICommand delete = new DeleteCommand(rec);

            Invoker inv = new Invoker();
            inv.ExecuteCommand(insert);
            inv.ExecuteCommand(update);
            inv.ExecuteCommand(delete);
        }
Esempio n. 4
0
 public InsertCommand(Receiver receiver)
 {
     _receiver = receiver;
 }