コード例 #1
0
 public void MarketBuilder()
 {
     MarketDB.Instance.InsertByForce();
     marketSession      = MarketYard.Instance;
     userServiceSession = (UserService)marketSession.GetUserService();
     userServiceSession.EnterSystem();
     orderServiceSession = (OrderService)marketSession.GetOrderService(ref userServiceSession);
     userBuyerHarmony    = new UserBuyerHarmony(ref userServiceSession);
 }
コード例 #2
0
        public void BuildOrderPool()
        {
            MarketDB.Instance.InsertByForce();
            market       = MarketYard.Instance;
            userService  = market.GetUserService();
            orderService = (OrderService)market.GetOrderService(ref userService);
            IUserBuyer buyer = new UserBuyerHarmony(ref userService);

            slave1 = new PurchaseItemSlave(buyer, new StoresSyncherHarmony(), OrderDL.Instance, Publisher.Instance, market.GetPolicyChecker());
            slave2 = new PurchaseEverythingSlave(buyer, new StoresSyncherHarmony(), OrderDL.Instance, Publisher.Instance, market.GetPolicyChecker());
            orderService.GiveDetails("Big Smoke", "Grove Street", "54238521");
            item1 = new OrderItem("Cluckin Bell", null, "#9", 5.00, 2);
            item2 = new OrderItem("Cluckin Bell", null, "#9 Large", 7.00, 1);
            item3 = new OrderItem("Cluckin Bell", null, "#6 Extra Dip", 8.50, 1);
        }