コード例 #1
0
        public async Task <TimeSpan> ConsultarTempo()
        {
            try
            {
                Reserva reserva = storage.Consultar();
                string  result  = await service.ConsultarTempo(reserva.Id);


                if (int.TryParse(result, out int minutos))
                {
                    return(new TimeSpan(0, minutos, 0));
                }
                else
                {
                    throw new ApplicationException("Erro ao consultar o tempo de espera, tente novamente mais tarde.");
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }