Beispiel #1
0
        static void Main(string[] args)
        {
            var paymentClient = new PaymentClient(new PaypalPaymentService());
            var totalAmount   = paymentClient.MakePayment(100);

            Console.WriteLine("Total Amount: " + totalAmount);

            paymentClient.ChangeStrategy(new LocalBankPaymentService());
            totalAmount = paymentClient.MakePayment(100);

            Console.WriteLine("Total Amount: " + totalAmount);
            Console.ReadLine();
        }