Esempio 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();
        }
Esempio 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();
        }
Esempio n. 3
0
 public Client(BusinessDelegate businessService)
 {
     this.businessService = businessService;
 }
Esempio n. 4
0
 public Client(BusinessDelegate businessDelegate)
 {
     this.businessDelegate = businessDelegate;
 }