Пример #1
0
 public void Add(TrainPart part)
 {
     if (part == null)
     {
         throw new ArgumentNullException(nameof(part));
     }
     if (Parts.Contains(part))
     {
         return;
     }
     Parts.Add(part);
 }
 internal static bool ContainsCall(this TrainPart me, StationCall call)
 {
     return(me.Train == call.Train && call.SequenceNumber >= me.From.SequenceNumber && call.SequenceNumber <= me.To.SequenceNumber);
 }