public static void EX1() { Receptor receptor = new Receptor(); Invocador invocador = new Invocador(new ComandoConcreto(receptor)); invocador.Action(); invocador = new Invocador(new ComandoConcreto2(receptor)); invocador.Action(); }
public ComandoConcreto2(Receptor receptor) { _receptor = receptor; }
public ComandoConcreto(Receptor receptor) { _receptor = receptor; }