Example #1
0
        public bool TryFindStop(StopSpecification find, out ResolvedServiceStop stop)
        {
            if (Details.TryFindStop(find, out var found))
            {
                stop = new ResolvedServiceStop(this, found);
                return(true);
            }

            stop = null;
            return(false);
        }
Example #2
0
 public bool TryFindStop(StopSpecification find, out ScheduleLocation stop)
 {
     stop = Locations.FirstOrDefault(l => l.IsStopAt(find));
     return(stop != default);
 }
Example #3
0
 public override bool IsStopAt(StopSpecification spec)
 {
     return(false);
 }
Example #4
0
 public abstract bool IsStopAt(StopSpecification spec);
Example #5
0
 private bool IsAt(StopSpecification spec)
 {
     return(spec.UseDeparture ? IsDeparture(spec.Time) : IsArrival(spec.Time));
 }
Example #6
0
 public override bool IsStopAt(StopSpecification spec)
 {
     return(IsStopAt(spec.Location) && HasAdvertisedTime(spec.UseDeparture) && IsAt(spec));
 }