/// <summary> /// Initializes the NextPageRequest property. /// </summary> public void InitializeNextPageRequest(IBaseClient client, string nextPageLinkString) { if (!string.IsNullOrEmpty(nextPageLinkString)) { this.NextPageRequest = new ListItemsCollectionRequest( nextPageLinkString, client, null); } }
public IEnumerable <T> GetListItems(string listId, string query = "") { IListItemsCollectionRequest listItemsCollectionRequest = ServiceClient.Sites[SiteId].Lists[listId].Items.Request(); if (!String.IsNullOrEmpty(query)) { listItemsCollectionRequest = listItemsCollectionRequest.Filter(query); } IListItemsCollectionPage listItems = listItemsCollectionRequest.Expand(listItem => listItem.Fields).GetAsync().Result; return(ParseEntity(listItems)); }
public static async Task <ListItem[]> GetAllAsync(this IListItemsCollectionRequest request) { var collectionPage = await request.GetAsync(); return(await GetAllAsync(collectionPage)); }