示例#1
0
        private static async Task <IList <Station> > FetchStationsFromServer()
        {
            RnvRequest      request  = new RnvRequest();
            IList <Station> stations = await request.FetchStations();

            return(stations);
        }
示例#2
0
        private async Task ShowDepartures(string hafasId)
        {
            RnvRequest request = new RnvRequest();
            Journey    journey = await request.FetchDeparturesForStation(hafasId);

            // Since data is fetched asynchronously, ReloadData() must be called after assigning the view source.
            // Otherwise, it's not going to be displayed.
            this.DepartureListTableView.Source = new DepartureListTableViewSource(journey.ListOfDepartures);
            this.DepartureListTableView.ReloadData();
        }
示例#3
0
 static RnvRequest()
 {
     RnvRequest.InitializeClient();
 }