internal PostsCollection(Surrogate surrogate, IFindierService findierService) { foreach (var item in surrogate.Items) { Add(item); } _request = surrogate.Request; _findierService = findierService; _currentResponse = surrogate.CurrentResponse; }
protected override async Task <IList <Post> > LoadMoreItemsOverrideAsync(CancellationToken c, uint count) { var response = await _findierService .SendAsync <GetPostsRequest, FindierPageData <Post> >(_request.Offset(Count).Limit((int)count)); if (!response.IsSuccessStatusCode) { return(null); } _currentResponse = response.DeserializedResponse; return(_currentResponse.Data.Results); }