Interface IListItemCollection
- Namespace
- PnP.Core.Model.SharePoint
- Assembly
- PnP.Core.dll
Public interface to define a collection of ListItem objects of SharePoint Online
public interface IListItemCollection : IQueryable<IListItem>, IQueryable, IAsyncEnumerable<IListItem>, IDataModelCollection<IListItem>, IEnumerable<IListItem>, IEnumerable, IDataModelParent, IDataModelWithContext, IRequestableCollection, IDataModelCollectionLoad<IListItem>, IDataModelCollectionDeleteByIntegerId, ISupportModules<IListItemCollection>
- Inherited Members
- Extension Methods
Methods
Add(Dictionary<string, object>, string, FileSystemObjectType)
Adds a new list item
IListItem Add(Dictionary<string, object> values, string folderPath = null, FileSystemObjectType underlyingObjectType = FileSystemObjectType.File)
Parameters
valuesDictionary<string, object>Values to add to list item
folderPathstringOptional folder path to add the item to.
underlyingObjectTypeFileSystemObjectTypeType of object to create. Defaults to File/ListItem
Returns
- IListItem
Newly added list item
AddAsync(Dictionary<string, object>, string, FileSystemObjectType)
Adds a new list item
Task<IListItem> AddAsync(Dictionary<string, object> values, string folderPath = null, FileSystemObjectType underlyingObjectType = FileSystemObjectType.File)
Parameters
valuesDictionary<string, object>Values to add to list item
folderPathstringOptional folder path to add the item to.
underlyingObjectTypeFileSystemObjectTypeType of object to create. Defaults to File/ListItem
Returns
AddBatch(Batch, Dictionary<string, object>, string, FileSystemObjectType)
Adds a new list item
IListItem AddBatch(Batch batch, Dictionary<string, object> values, string folderPath = null, FileSystemObjectType underlyingObjectType = FileSystemObjectType.File)
Parameters
batchBatchBatch to use
valuesDictionary<string, object>Values to add to list item
folderPathstringOptional folder path to add the item to.
underlyingObjectTypeFileSystemObjectTypeType of object to create. Defaults to File/ListItem
Returns
- IListItem
Newly added list item
AddBatch(Dictionary<string, object>, string, FileSystemObjectType)
Adds a new list item
IListItem AddBatch(Dictionary<string, object> values, string folderPath = null, FileSystemObjectType underlyingObjectType = FileSystemObjectType.File)
Parameters
valuesDictionary<string, object>Values to add to list item
folderPathstringOptional folder path to add the item to.
underlyingObjectTypeFileSystemObjectTypeType of object to create. Defaults to File/ListItem
Returns
- IListItem
Newly added list item
AddBatchAsync(Batch, Dictionary<string, object>, string, FileSystemObjectType)
Adds a new list item
Task<IListItem> AddBatchAsync(Batch batch, Dictionary<string, object> values, string folderPath = null, FileSystemObjectType underlyingObjectType = FileSystemObjectType.File)
Parameters
batchBatchBatch to use
valuesDictionary<string, object>Values to add to list item
folderPathstringOptional folder path to add the item to.
underlyingObjectTypeFileSystemObjectTypeType of object to create. Defaults to File/ListItem
Returns
AddBatchAsync(Dictionary<string, object>, string, FileSystemObjectType)
Adds a new list item
Task<IListItem> AddBatchAsync(Dictionary<string, object> values, string folderPath = null, FileSystemObjectType underlyingObjectType = FileSystemObjectType.File)
Parameters
valuesDictionary<string, object>Values to add to list item
folderPathstringOptional folder path to add the item to.
underlyingObjectTypeFileSystemObjectTypeType of object to create. Defaults to File/ListItem
Returns
Contains(int)
Checks if the collection contains a listitem with a given id
bool Contains(int id)
Parameters
idintId to check for
Returns
- bool
True if found, false otherwise
GetById(int, params Expression<Func<IListItem, object>>[])
Method to select a list item by Id
IListItem GetById(int id, params Expression<Func<IListItem, object>>[] selectors)
Parameters
idintThe Id to search for
selectorsExpression<Func<IListItem, object>>[]The expressions declaring the fields to select
Returns
- IListItem
The resulting list item instance, if any
GetByIdAsync(int, params Expression<Func<IListItem, object>>[])
Method to select a list item by Id asynchronously
Task<IListItem> GetByIdAsync(int id, params Expression<Func<IListItem, object>>[] selectors)
Parameters
idintThe Id to search for
selectorsExpression<Func<IListItem, object>>[]The expressions declaring the fields to select
Returns
RecycleById(int)
Recycle the list item
Guid RecycleById(int id)
Parameters
idintId of the item to recycle
Returns
RecycleByIdAsync(int)
Recycle the list item
Task<Guid> RecycleByIdAsync(int id)
Parameters
idintId of the item to recycle
Returns
RecycleByIdBatch(Batch, int)
Recycle the list item
void RecycleByIdBatch(Batch batch, int id)
Parameters
RecycleByIdBatch(int)
Recycle the list item
void RecycleByIdBatch(int id)
Parameters
idintId of the item to recycle
RecycleByIdBatchAsync(Batch, int)
Recycle the list item
Task RecycleByIdBatchAsync(Batch batch, int id)
Parameters
Returns
RecycleByIdBatchAsync(int)
Recycle the list item
Task RecycleByIdBatchAsync(int id)
Parameters
idintId of the item to recycle