mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-04 19:26:51 +00:00
Change ReadOnlyPagedCollection to accept a Func
This is technically better because the old way was actually losing accepts header and parameters.
This commit is contained in:
@@ -27,7 +27,9 @@ namespace Octokit.Tests.Models
|
||||
};
|
||||
var connection = Substitute.For<IConnection>();
|
||||
connection.GetAsync<List<object>>(nextPageUrl, null, null).Returns(nextPageResponse);
|
||||
var pagedCollection = new ReadOnlyPagedCollection<object>(response, connection);
|
||||
var pagedCollection = new ReadOnlyPagedCollection<object>(
|
||||
response,
|
||||
nextPageUri => connection.GetAsync<List<object>>(nextPageUrl, null, null));
|
||||
|
||||
var nextPage = await pagedCollection.GetNextPage();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user