Exemplo n.º 1
0
        static void Main(string[] args)
        {
            BusinessDelegate businessDelegate = new BusinessDelegate
            {
                ServiceType = "EJB"
            };
            Client client = new Client(businessDelegate);

            client.Do();
            businessDelegate.ServiceType = "JMS";
            client.Do();
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            BusinessDelegate businessDelegate = new BusinessDelegate();

            businessDelegate.setServiceType("EJB");

            Client client = new Client(businessDelegate);

            client.doTask();

            businessDelegate.setServiceType("JMS");
            client.doTask();
        }
Exemplo n.º 3
0
 public Client(BusinessDelegate businessService)
 {
     this.businessService = businessService;
 }
Exemplo n.º 4
0
 public Client(BusinessDelegate businessDelegate)
 {
     this.businessDelegate = businessDelegate;
 }