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