public static async Task <Flight> ReadFlight(this StorageFile file) { using (var stream = await file.OpenStreamForReadAsync()) { return(FlightDataReader.Read(stream)); } }
public void Test1() { using (var stream = File.OpenRead("Test.json")) { var data = FlightDataReader.Read(stream); } }