public StationCall(StationTrack track, Time arrival, Time departure) { if (track == null) throw new ArgumentNullException(nameof(track)); if (arrival == null) throw new ArgumentNullException(nameof(arrival)); if (departure == null) throw new ArgumentNullException(nameof(departure)); EnsureArrivalNotAfterDeparture(arrival, departure); Track = track; Arrival = arrival; Departure = departure; track.Add(this); }
public static void RecordHandler(IDataRecord record, TrackLayout layout) { var track = new StationTrack(record.GetString(record.GetOrdinal("Number"))); var station = layout.Station(record.GetString(record.GetOrdinal("Signature"))); station.Add(track); }
public void Add(StationTrack track) { if (track == null) throw new ArgumentNullException(nameof(track)); track.Station = this; _tracks.Add(track); }
public StationTrack StationTrack(StationTrack value) { return StationTracks.Where(t => t.Equals(value)).Single(); }
public bool HasTrack (StationTrack track) { return StationTracks.Any(t => t.Equals(track)); }