Open
Description
I think I found an error in your documentation in the "data pagination" section.
// users is of type `PaginationResult`
var users = query.Paginate(1, 10);
foreach(var user in users.Each)
{
Console.WriteLine($"Id: {user.Id}, Name: {user.Name}");
}
In this example, it means that we can iterate over the returned data.
But this example incorrect. In fact users.Each
returns PaginationIterator<T>
which has this enumerator:
public IEnumerator<PaginationResult<T>> GetEnumerator()
{
CurrentPage = FirstPage;
yield return CurrentPage;
while (CurrentPage.HasNext)
{
CurrentPage = CurrentPage.Next();
yield return CurrentPage;
}
}
Is this a mistake in the documentation, or am I just misunderstanding it?
Metadata
Metadata
Assignees
Labels
No labels