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