Exemplo n.º 1
0
 /// <summary>
 /// Add a service stop to the station
 /// </summary>
 /// <param name="stop">Service stop</param>
 public void Add(ScheduleLocation stop)
 {
     Timetable.AddService(stop);
     if (stop.IsAdvertised())
     {
         TocServices.Add(stop.Schedule.Operator);
     }
 }
Exemplo n.º 2
0
        internal void AddService(ScheduleLocation stop)
        {
            if (stop is IArrival arrival && arrival.IsPublic)
            {
                _arrivals.AddService(new ArrivalServiceTime(arrival));
            }

            if (stop is IDeparture departure && departure.IsPublic)
            {
                _departures.AddService(new DepartureServiceTime(departure));
            }
        }
Exemplo n.º 3
0
 public ResolvedServiceStop(ResolvedService service, ScheduleLocation stop)
 {
     Service = service;
     Stop    = new ResolvedStop(stop, service.On);
     ViaText = Stop.Stop.Station.GetViaText(Service.Details);
 }
Exemplo n.º 4
0
 public bool TryFindStop(StopSpecification find, out ScheduleLocation stop)
 {
     stop = Locations.FirstOrDefault(l => l.IsStopAt(find));
     return(stop != default);
 }
Exemplo n.º 5
0
 internal void AddLocation(ScheduleLocation location) => _locations.Add(location);
Exemplo n.º 6
0
 public ResolvedStop(ScheduleLocation stop, DateTime on)
 {
     Stop = stop;
     On   = on;
 }