Ejemplo n.º 1
0
        private static void Main()
        {
            ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
            UserLocation userLocation = GetUserLocation.ReturnUserLocation(GetPostCode());

            List <StopPoint> localStopPoints = GetLocalStopPoints.ReturnStopPoints(userLocation, GetUserMaxDistanceFromStation());

            DisplayAvailableStops(localStopPoints);
            string busStop = localStopPoints[GetBusStop(localStopPoints.Count)].naptanId;

            List <Arrival> arrivals = GetArrivals.ReturnArrivals(busStop);

            arrivals = arrivals.OrderBy(n => n.ExpectedArrival).ToList();

            Console.WriteLine();
            DisplayArrivals(arrivals);

            Console.ReadLine();
        }
Ejemplo n.º 2
0
 public BusInfo(StationID stationID)
 {
     Arrivals   = sortArrivals(GetArrivals.ReturnArrivals(stationID.naptamID), stationID);
     naptamID   = stationID.naptamID;
     CommonName = stationID.commonName;
 }