コード例 #1
0
        public IEnumerable <Airport> GetAirports()
        {
            IEnumerable <Airport> airports = null;

            using (var stream = fileHelper.ReadResourceFileAsStream("GuestlogixTestXF.Data.airports.csv"))
            {
                airports = CsvConverter.Serialize <Airport>(stream);
            }

            return(airports);
        }
コード例 #2
0
        /// <summary>
        /// Returns all routes from the CSV-file
        /// </summary>
        public IEnumerable <Route> GetRoutes()
        {
            IEnumerable <Route> routes = null;

            using (var stream = fileHelper.ReadResourceFileAsStream("GuestlogixTestXF.Data.routes.csv"))
            {
                routes = CsvConverter.Serialize <Route>(stream);
            }

            return(routes);
        }