protected override DateTime GetEarliestDepartureDateTime(StopsBasic.StopBasic stop) { foreach (var js in journey.JourneySegments) { if (DataFeedDesktop.Basic.Stops.FindByIndex(js.SourceStopID).ParentStation.ID == stop.ParentStation.ID) { return(js.DepartureDateTime); } if (js is TripSegment) { foreach (var @is in (js as TripSegment).IntermediateStops) { if (DataFeedDesktop.Basic.Stops.FindByIndex(@is.StopID).ParentStation.ID == stop.ParentStation.ID) { return(@is.Arrival); } } } if (DataFeedDesktop.Basic.Stops.FindByIndex(js.TargetStopID).ParentStation.ID == stop.ParentStation.ID) { return(js.ArrivalDateTime); } } throw new ArgumentException("Stop ID not found in the journey."); }
public StopPin(StopsBasic.StopBasic stop) => Stop = stop;
protected override DateTime GetEarliestDepartureDateTime(StopsBasic.StopBasic stop) => DateTime.Now;