Exemplo n.º 1
0
        void _paymentWorker_DoWork(object sender, DoWorkEventArgs e)
        {
            var reservation    = (VolarisReservation)e.Argument;
            var creditCardinfo = reservation.Payment.CreditCardInformation;

            if (PaymentFactory.ContainsKey(creditCardinfo.Type))
            {
                var payment = PaymentFactory[creditCardinfo.Type]();
                payment.ServiceManager.OnWebServiceCallStart     += OnWebServiceCallStartDelegate;
                payment.ServiceManager.OnWebServiceCallCompleted += OnWebServiceCallCompletedDelegate;;
                payment.Commit(reservation);
            }
        }