Awaiting an IAsyncOperation in F#
问题 I have the following code in F#: let CreateSampleDataFromJson<'T>(path) = let uri = new Uri(path) async { let file = StorageFile.GetFileFromApplicationUriAsync(uri) let jsonText = FileIO.ReadTextAsync(file) return JsonObject<'T>.Parse(jsonText) } The problem I'm having is that file is an IAsyncOperation<StorageFile> and not a StorageFile as ReadTextAsync expects. In C# you can do something similar to this: var file = await StorageFile.GetFileFromApplicationUriAsync(uri) i.e. public async Task