Azure / Azure-Functions

1.11k stars 195 forks source link

IAsyncEnumerable support in Azure Functions V3 #1414

Open pablocastillaquintas opened 4 years ago

pablocastillaquintas commented 4 years ago

Hi!

In order to return data in a stream and being more memory friendly it would be fantastic if the AF could support IAsyncEnumerable return. Example:

[FunctionName("Function1")] public static async IAsyncEnumerable Run( [HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)] HttpRequest req, ILogger log) { log.LogInformation("C# HTTP trigger function processed a request."); for (var i = 0; i < 10; i++) { yield return i; } }

Thanks

alexminza commented 1 year ago

Related to https://github.com/Azure/azure-functions-dotnet-worker/issues/773