Exemple #1
0
        public static IOrderProcessorProxy CreateOrderProcessorProxyConfjg()
        {
            Assembly             assembly            = Assembly.Load(DllName);
            IOrderProcessorProxy orderProcessorProxy = assembly.CreateInstance(OrderProcessorProxyName) as IOrderProcessorProxy;

            orderProcessorProxy = new OrderProcessorProxyLog(orderProcessorProxy);
            orderProcessorProxy = new OrderProcessorProxyAuthentication(orderProcessorProxy);

            return(orderProcessorProxy);
        }
Exemple #2
0
        public static IOrderProcessorProxy CreateOrderProcessorProxy(OrderProcessorProxyType processorProxyType)
        {
            IOrderProcessorProxy orderProcessorProxy = null;

            switch (processorProxyType)
            {
            case OrderProcessorProxyType.Product:
                orderProcessorProxy = new ProductOrderProcessor();
                break;

            case OrderProcessorProxyType.Recharge:
                orderProcessorProxy = new RechargeOrderProcessor();
                break;

            default:
                throw new Exception("没有找到订单类型");
            }
            orderProcessorProxy = new OrderProcessorProxyLog(orderProcessorProxy);
            orderProcessorProxy = new OrderProcessorProxyAuthentication(orderProcessorProxy);
            return(orderProcessorProxy);
        }