msgraph-sdk-design
msgraph-sdk-design copied to clipboard
PageIterator<T> should return an IAsyncEnumerable<T>
The current PageIterator implementation requires the caller to have a callback function to process the individual items in the list, and it's impossible to use the modern IAsyncEnumerable<T> pattern.
Please provide an overload to the CreatePageIterator function to return an IAsyncEnumerable<T> directly, without requiring the callback.
This could be a part of #37.
@nikithauc What is the status of this issue? It would be very useful to have.
@maisarissi / @andrueastman do you have an update?
+2 years later - doesn't it make sense to provide such a thing, or at least a workaround?
I wrote my own extensions for this, feel free to copy: https://github.com/microsoftgraph/dotnet-aad-query-sample/blob/main/MsGraphSamples.Services/GraphExtensions.cs