Interface IListItemCollection
Public interface to define a collection of ListItem objects of SharePoint Online
Assembly: PnP.Core.dll
Syntax
public interface IListItemCollection : IDataModelCollection<IListItem>, IDataModelParent, IDataModelWithContext, IRequestableCollection, IDataModelCollectionLoad<IListItem>, IDataModelCollectionDeleteByIntegerId, ISupportModules<IListItemCollection>
Methods
Declaration
IListItem Add(Dictionary<string, object> values, string folderPath = null, FileSystemObjectType underlyingObjectType = default(FileSystemObjectType))
Parameters
Dictionary<System.String, System.Object>
values
Values to add to list item
|
System.String
folderPath
Optional folder path to add the item to.
|
FileSystemObjectType
underlyingObjectType
Type of object to create. Defaults to File/ListItem
|
Returns
Declaration
Task<IListItem> AddAsync(Dictionary<string, object> values, string folderPath = null, FileSystemObjectType underlyingObjectType = default(FileSystemObjectType))
Parameters
Dictionary<System.String, System.Object>
values
Values to add to list item
|
System.String
folderPath
Optional folder path to add the item to.
|
FileSystemObjectType
underlyingObjectType
Type of object to create. Defaults to File/ListItem
|
Returns
Declaration
IListItem AddBatch(Dictionary<string, object> values, string folderPath = null, FileSystemObjectType underlyingObjectType = default(FileSystemObjectType))
Parameters
Dictionary<System.String, System.Object>
values
Values to add to list item
|
System.String
folderPath
Optional folder path to add the item to.
|
FileSystemObjectType
underlyingObjectType
Type of object to create. Defaults to File/ListItem
|
Returns
Declaration
IListItem AddBatch(Batch batch, Dictionary<string, object> values, string folderPath = null, FileSystemObjectType underlyingObjectType = default(FileSystemObjectType))
Parameters
Batch
batch
Batch to use
|
Dictionary<System.String, System.Object>
values
Values to add to list item
|
System.String
folderPath
Optional folder path to add the item to.
|
FileSystemObjectType
underlyingObjectType
Type of object to create. Defaults to File/ListItem
|
Returns
Declaration
Task<IListItem> AddBatchAsync(Dictionary<string, object> values, string folderPath = null, FileSystemObjectType underlyingObjectType = default(FileSystemObjectType))
Parameters
Dictionary<System.String, System.Object>
values
Values to add to list item
|
System.String
folderPath
Optional folder path to add the item to.
|
FileSystemObjectType
underlyingObjectType
Type of object to create. Defaults to File/ListItem
|
Returns
Declaration
Task<IListItem> AddBatchAsync(Batch batch, Dictionary<string, object> values, string folderPath = null, FileSystemObjectType underlyingObjectType = default(FileSystemObjectType))
Parameters
Batch
batch
Batch to use
|
Dictionary<System.String, System.Object>
values
Values to add to list item
|
System.String
folderPath
Optional folder path to add the item to.
|
FileSystemObjectType
underlyingObjectType
Type of object to create. Defaults to File/ListItem
|
Returns
Checks if the collection contains a listitem with a given id
Declaration
Parameters
System.Int32
id
Id to check for
|
Returns
System.Boolean
True if found, false otherwise
|
Method to select a list item by Id
Declaration
IListItem GetById(int id, params Expression<Func<IListItem, object>>[] selectors)
Parameters
System.Int32
id
The Id to search for
|
Expression<Func<IListItem, System.Object>>[]
selectors
The expressions declaring the fields to select
|
Returns
IListItem
The resulting list item instance, if any
|
Method to select a list item by Id asynchronously
Declaration
Task<IListItem> GetByIdAsync(int id, params Expression<Func<IListItem, object>>[] selectors)
Parameters
System.Int32
id
The Id to search for
|
Expression<Func<IListItem, System.Object>>[]
selectors
The expressions declaring the fields to select
|
Returns
Task<IListItem>
The resulting list item instance, if any
|
Declaration
Parameters
System.Int32
id
Id of the item to recycle
|
Returns
Declaration
Task<Guid> RecycleByIdAsync(int id)
Parameters
System.Int32
id
Id of the item to recycle
|
Returns
Declaration
void RecycleByIdBatch(Batch batch, int id)
Parameters
Batch
batch
Batch to add the request to
|
System.Int32
id
Id of the item to recycle
|
Declaration
void RecycleByIdBatch(int id)
Parameters
System.Int32
id
Id of the item to recycle
|
Declaration
Task RecycleByIdBatchAsync(Batch batch, int id)
Parameters
Batch
batch
Batch to add the request to
|
System.Int32
id
Id of the item to recycle
|
Returns
Declaration
Task RecycleByIdBatchAsync(int id)
Parameters
System.Int32
id
Id of the item to recycle
|
Returns
Extension Methods