Esempio n. 1
0
 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);
 }
Esempio n. 2
0
 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);
 }
Esempio n. 3
0
 public void Add(StationTrack track) {
     if (track == null) throw new ArgumentNullException(nameof(track));
     track.Station = this;
     _tracks.Add(track);
 }
Esempio n. 4
0
 public StationTrack StationTrack(StationTrack value) { return StationTracks.Where(t => t.Equals(value)).Single(); }
Esempio n. 5
0
 public bool HasTrack (StationTrack track) { return StationTracks.Any(t => t.Equals(track)); }