Ejemplo n.º 1
0
        public async Task <OrderDto> GetCurrentOrder(string orderId)
        {
            Order orderResponse = await communicationService.AskForOrder(orderId);

            OrderDto orderDto = new OrderDto();
            await Task.Factory.StartNew(() =>
            {
                lock (m_SyncObject)
                {
                    _dataRepository.RefreshCurrentOrder(orderResponse);
                    orderDto = _dataRepository.GetCurrentOrder().ToDto();
                }
            });

            return(orderDto);
        }