private IEnumerable <IRunway> ParseRunwayData(Stream data) { var newRunways = new List <IRunway>(50000); using (var sr = new StreamReader(data)) { while (!sr.EndOfStream) { try { newRunways.Add(Runway.CreateFromString(sr.ReadLine())); } catch (FormatException) { throw new AirportDirectoryException("Impossible to parse a runway from the database"); } } } return(newRunways); }