public void CreateOrder(IOrderState orderState) { var order = orderState.State(); //Create order Console.WriteLine("Order created"); }
public void ChangeState(IOrderState orderState) { if (!orderState.CanDo()) { throw new NotImplementedException("Cannot"); } var order = orderState.State(); //Save order Console.WriteLine("Save order"); }