private static IEnumerable <FootnoteDisplayModel> GetFootnotesForTimingPoint(TrainLocationTime timingPoint) { List <FootnoteDisplayModel> footnotes = new List <FootnoteDisplayModel>(); if (timingPoint.ArrivalTime != null) { footnotes.AddRange(GetFootnotesForTrainTime(timingPoint.ArrivalTime)); } if (timingPoint.DepartureTime != null) { footnotes.AddRange(GetFootnotesForTrainTime(timingPoint.DepartureTime)); } return(footnotes); }
/// <summary> /// Create a copy of this instance. The <see cref="ArrivalTime"/> and <see cref="DepartureTime"/> properties are deep copies, the others shallow copies. /// </summary> /// <returns>A <see cref="TrainLocationTime"/> object whose properties are equal to this instance.</returns> public TrainLocationTime Copy() { TrainLocationTime tlt = new TrainLocationTime { ArrivalTime = ArrivalTime.Copy(), DepartureTime = DepartureTime.Copy(), Location = Location, Pass = Pass, Path = Path, Platform = Platform, Line = Line, FormattingStrings = FormattingStrings, }; return(tlt); }