private void CollectBarsFromProvider(IBeerable provider, BarDataModel barList,
                                      string latitude, string longitude, string radius)
 {
     try
     {
         barList.CombineLists(provider.GetBarsAround(latitude, longitude, radius));
     }
     catch (Exception exception)
     {
         MessageBox.Show("Something went wrong with the message: " + exception.Message);
     }
 }
Пример #2
0
 private static async Task <List <BarData> > CollectBarsFromProvider(IBeerable provider,
                                                                     double latitude, double longitude, double radius)
 {
     try
     {
         return(await provider.GetBarsAroundAsync(latitude, longitude, radius));
     }
     catch (NotImplementedException)
     {
         return(provider.GetBarsAround(latitude, longitude, radius));
     }
 }
Пример #3
0
        private async Task <List <BarData> > CollectBarsFromProvider(IBeerable provider,
                                                                     string latitude, string longitude, string radius)
        {
            List <BarData> response;

            try
            {
                response = await provider.GetBarsAroundAsync(latitude, longitude, radius);
            }
            catch (NotImplementedException)
            {
                response = provider.GetBarsAround(latitude, longitude, radius);
            }
            return(response);
        }