Пример #1
0
        private Guid get_basket_id()
        {
            Guid basket_id;

            if (!_client_storage.contains_a_value_for_the_key("basket_id"))
            {
                basket_id = Guid.NewGuid();
                _client_storage.add("basket_id", basket_id);

                var create_basket = new CreateABasketCommand(basket_id);
                _application.action_request_to(create_basket);
            }
            else
            {
                basket_id = _client_storage.get_value_for <Guid>("basket_id");
            }
            return(basket_id);
        }