Ejemplo n.º 1
0
 internal static Train Create(string number, Station from, Station to, DateTime departure, DateTime arrival, CoachType[] types)
 {
     return(new Train
     {
         Number = number,
         SourceStation = from,
         DestinationStation = to,
         DepartureTime = UzTime.Create(departure),
         ArrivalTime = UzTime.Create(arrival),
         TrainSourceStation = $"Before_{from.Title}",
         TrainDestinationStation = $"After_{to.Title}",
         TravelTime = arrival - departure,
         CoachTypes = types
     });
 }
Ejemplo n.º 2
0
 public static RouteData Create(Station sourceStation, Station destinationStation, UzTime date, Train train)
 {
     return(new RouteData
     {
         SourceStation = sourceStation,
         DestinationStation = destinationStation,
         Date = date,
         Train = train
     });
 }