Can you use IAsyncEnumerable in Razor pages to progressively display markup?
问题 I've been playing around with Blazor and the IAsyncEnumerable feature in C# 8.0. Is it possible to use IAsyncEnumerable and await within Razor Pages to progressively display markup with data? Example service: private static readonly string[] games = new[] { "Call of Duty", "Legend of Zelda", "Super Mario 64" }; public async IAsyncEnumerable<string> GetGames() { foreach (var game in games) { await Task.Delay(1000); yield return game; } } Example in razor page: @await foreach(var game in