示例#1
0
        static void Main(string[] args)
        {
            // FacadeUpStreamOrder facade = new FacadeUpStreamOrder();

            // IOrderAdapter adapter = new JsonOrderAdapter(facade);

            // Order[] orders = new OrderService(adapter).ProcessOrders();

            var facade = new FacadeUpStreamTypedOrder();

            ITypedOrderAdapter adapter = new JsonTypedOrderAdapter(facade);

            TypedOrder[] orders = new TypedOrderService(adapter).ProcessOrders();
        }
示例#2
0
        public void GetOrder_WhenCalled()
        {
            var sut = new FacadeUpStreamTypedOrder();

            var actual = sut.GetOrder();
        }
示例#3
0
 public JsonTypedOrderAdapter(FacadeUpStreamTypedOrder facade)
 {
     this.facade = facade;
 }