I am creating a library that uses a number of clients which return AsyncPageables. Most of the functions in my library convert objects from the AsyncEnumerable into some other format. Right now, I am using System.Linq.Async, to make the conversion more or less on demand. I want to extend that idea to pass on the utility of pagination, because the App that uses the library will benefit greatly from loading data in a paginated way.
Here is a very simple example
public IAsyncEnumerable<string> ListBlobNamesAsync()
{
var blobPageable = _container.ListBlobsAsync();
return blobPageble.Select(i=>i.Name); //Uses System.Linq.Async
}
I would like to instead convert this to another AsyncPageable that applies transform (i=>i.Name
)