Пример #1
0
        private static void OrderWithState()
        {
            Order order = new Order();

            order.AddBook("foo");
            order.AddBook("bar");

            order.SubmitOrder();
            // uncomment to show problem
            //order.Ship();

            order.DeliveryDetailsSupplied("123 Johnson Street, KFalls Or, 97601");

            order.ItemPicked("foo");
            order.ItemPicked("bar");

            order.Ship();
        }
Пример #2
0
 public ShippedState(Order order)
     : base(order)
 {
 }
Пример #3
0
 public SelectingState(Order order)
     : base(order)
 {
 }
Пример #4
0
 public ReadyForShippingState(Order order)
     : base(order)
 {
 }
Пример #5
0
 public OrderPickingState(Order order)
     : base(order)
 {
 }
Пример #6
0
 public SupplyingDeliveryDetailsState(Order order)
     : base(order)
 {
 }
Пример #7
0
 public AbstractStates(Order order)
 {
     this.order = order;
 }