public void CombinedInfoForLocation(GeoCoordinate location, int radiusInMeters, int maxCount, bool invalidateCache) { webservice.StopsForLocation( location, null, radiusInMeters, maxCount, invalidateCache, delegate(List <Stop> stops, bool limitExceeded, Exception e) { Exception error = e; List <Route> routes = new List <Route>(); try { if (error == null) { routes = GetRoutesFromStops(stops, location); } } catch (Exception ex) { Debug.Assert(false); error = ex; } if (CombinedInfoForLocation_Completed != null) { CombinedInfoForLocation_Completed(this, new ViewModel.EventArgs.CombinedInfoForLocationEventArgs(stops, routes, location, error)); } } ); }
public void CombinedInfoForLocation(GeoCoordinate location, int radiusInMeters, int maxCount, bool invalidateCache) { webservice.StopsForLocation( location, null, radiusInMeters, maxCount, invalidateCache, delegate(List <Stop> stops, bool limitExceeded) { List <Route> routes = new List <Route>(); routes = GetRoutesFromStops(stops, location); if (CombinedInfoForLocation_Completed != null) { CombinedInfoForLocation_Completed(this, new ViewModel.EventArgs.CombinedInfoForLocationEventArgs(stops, routes, location)); } } ); }