public TimeSpan GetFlightTime(AirlinerType type)
{
if (HasStopovers)
{
double totalMinutes = Stopovers.SelectMany(s => s.Legs)
.Sum(l => l.GetFlightTime(type).TotalMinutes);
double totalRestTime = FleetAirlinerHelpers.GetMinTimeBetweenFlights(type).TotalMinutes
*(Stopovers.SelectMany(s => s.Legs).Count() - 1);
var time = (int) (totalRestTime + totalMinutes);
return new TimeSpan(0, time, 0);
}
return MathHelpers.GetFlightTime(Destination1, Destination2, type);
}