Interface IList
Public interface to define a List object of SharePoint Online
Assembly: PnP.Core.dll
Syntax
public interface IList : IDataModel<IList>, IDataModelParent, IDataModelWithContext, ISupportModules<IList>, IDataModelGet<IList>, IDataModelLoad<IList>, IDataModelUpdate, IDataModelDelete, IDataModelSupportingGetChanges, ISecurableObject, IQueryableDataModel
Properties
A special property used to add an asterisk to a $select statement
Declaration
Property Value
Gets the base type for a list.
Declaration
ListBaseType BaseType { get; }
Property Value
Declaration
IContentTypeCollection ContentTypes { get; }
Property Value
Gets or sets whether content types are enabled
Declaration
bool ContentTypesEnabled { get; set; }
Property Value
Specifies the date and time that the list was created.
Declaration
DateTime Created { get; }
Property Value
Gets or sets whether the item is opened by default using the browser.
Declaration
bool DefaultItemOpenInBrowser { get; set; }
Property Value
The url to the default view of this list.
Declaration
string DefaultViewUrl { get; }
Property Value
Gets or sets the description of the list
Declaration
string Description { get; set; }
Property Value
Defines a value that specifies the reading order of the list.
Declaration
ListReadingDirection Direction { get; set; }
Property Value
Gets or sets a value that specifies the identifier of the document template for the new list.
SP REST property name: DocumentTemplateUrl.
Declaration
string DocumentTemplate { get; set; }
Property Value
Gets or sets the DraftVersionVisibility for the list
Declaration
DraftVisibilityType DraftVersionVisibility { get; set; }
Property Value
Gets or sets whether attachments are enabled. Defaults to true.
Declaration
bool EnableAttachments { get; set; }
Property Value
Gets or sets whether folder is enabled. Defaults to true.
Declaration
bool EnableFolderCreation { get; set; }
Property Value
Gets or sets whether minor verisioning is enabled on the list
Declaration
bool EnableMinorVersions { get; set; }
Property Value
Gets or sets whether moderation/content approval is enabled on the list
Declaration
bool EnableModeration { get; set; }
Property Value
Gets or sets whether verisioning is enabled on the list
Declaration
bool EnableVersioning { get; set; }
Property Value
Declaration
IEventReceiverDefinitionCollection EventReceivers { get; }
Property Value
Defines a list of default values for the Fields of the List Instance
Declaration
Dictionary<string, string> FieldDefaults { get; }
Property Value
Dictionary<System.String, System.String>
|
Declaration
IFieldCollection Fields { get; }
Property Value
Gets or sets whether to force checkout of documents in the library
Declaration
bool ForceCheckout { get; set; }
Property Value
Gets or sets whether to hide the list
Declaration
bool Hidden { get; set; }
Property Value
The Unique ID of the List object
Declaration
Property Value
Defines a value that specifies the URI for the icon of the list, optional attribute.
Declaration
string ImageUrl { get; set; }
Property Value
Defines if IRM is enabled for this list.
Declaration
bool IrmEnabled { get; set; }
Property Value
Defines if IRM Expire property, optional attribute.
Declaration
bool IrmExpire { get; set; }
Property Value
Defines the IRM Reject property, optional attribute.
Declaration
bool IrmReject { get; set; }
Property Value
Defines a value that specifies a flag that a client application can use to determine whether to display the list, optional attribute.
Declaration
bool IsApplicationList { get; set; }
Property Value
Gets a bool value that indicates whether the list is a gallery, such list templates, Web Parts, or Master Pages.
Declaration
Property Value
Is this library the default document library of this site
Declaration
bool IsDefaultDocumentLibrary { get; }
Property Value
Gets a bool value that indicates whether the document library is a private list with restricted permissions, such as for Solutions
Declaration
Property Value
Is this library the site's site asset library
Declaration
bool IsSiteAssetsLibrary { get; }
Property Value
Specifies whether the list is system list that does not contain end user data and created by system account.
Declaration
bool IsSystemList { get; }
Property Value
Number of items in the library
Declaration
Property Value
Declaration
IListItemCollection Items { get; }
Property Value
Specifies when an item in the list was last deleted. If no item has yet been deleted from the list
the list creation time is returned.
Declaration
DateTime LastItemDeletedDate { get; }
Property Value
Specifies when an item, field, or property of the list was last modified. If no item has been created in the list,
the list creation time is returned.
Declaration
DateTime LastItemModifiedDate { get; }
Property Value
Specifies when an item of the list was last modified by a non-system update. A non-system update is a change to a list item that is visible to users.
If no item has been created in the list, the list creation time is returned.
Declaration
DateTime LastItemUserModifiedDate { get; }
Property Value
Defines the current list UI/UX experience (valid for SPO only).
SP REST property name: ListExperienceOptions.
Declaration
ListExperience ListExperience { get; set; }
Property Value
The entity needed when updating list items
Declaration
string ListItemEntityTypeFullName { get; }
Property Value
Gets or sets the MinorVersionLimit for verisioning, just in case it is enabled on the list
SP REST property name: MajorVersionLimit.
Declaration
int MaxVersionLimit { get; set; }
Property Value
Gets or sets the MinorVersionLimit for versioning, just in case it is enabled on the list
SP REST property name: MajorWithMinorVersionsLimit.
Declaration
int MinorVersionLimit { get; set; }
Property Value
Defines if the current list or library has to be included in crawling, optional attribute.
Declaration
bool NoCrawl { get; set; }
Property Value
Gets or sets a value that specifies whether the new list is displayed on the Quick Launch of the site.
Declaration
bool OnQuickLaunch { get; set; }
Property Value
Defines the Read Security property, optional attribute.
Declaration
int ReadSecurity { get; set; }
Property Value
Gets the root folder of the list.
Declaration
IFolder RootFolder { get; }
Property Value
Gets or sets the Guid for TemplateFeature
Declaration
Guid TemplateFeatureId { get; }
Property Value
Declaration
ListTemplateType TemplateType { get; }
Property Value
Gets or sets the list title
Declaration
string Title { get; set; }
Property Value
Declaration
IUserCustomActionCollection UserCustomActions { get; }
Property Value
Defines a value that specifies the error message returned when data validation fails for a list item, optional attribute.
Declaration
string ValidationMessage { get; set; }
Property Value
Declaration
IViewCollection Views { get; }
Property Value
Declaration
IListSubscriptionCollection Webhooks { get; }
Property Value
Defines the Write Security property, optional attribute.
Declaration
int WriteSecurity { get; set; }
Property Value
Methods
Declaration
IListItem AddListFolder(string path, string parentFolder = null, string contentTypeId = "0x0120")
Parameters
System.String
path
|
System.String
parentFolder
|
System.String
contentTypeId
|
Returns
Declaration
Task<IListItem> AddListFolderAsync(string path, string parentFolder = null, string contentTypeId = "0x0120")
Parameters
System.String
path
|
System.String
parentFolder
|
System.String
contentTypeId
|
Returns
Declaration
IListItem AddListFolderBatch(Batch batch, string path, string parentFolder = null, string contentTypeId = "0x0120")
Parameters
Batch
batch
Batch to add this request to
|
System.String
path
|
System.String
parentFolder
|
System.String
contentTypeId
|
Returns
Declaration
IListItem AddListFolderBatch(string path, string parentFolder = null, string contentTypeId = "0x0120")
Parameters
System.String
path
|
System.String
parentFolder
|
System.String
contentTypeId
|
Returns
Declaration
Task<IListItem> AddListFolderBatchAsync(Batch batch, string path, string parentFolder = null, string contentTypeId = "0x0120")
Parameters
Batch
batch
Batch to add this request to
|
System.String
path
|
System.String
parentFolder
|
System.String
contentTypeId
|
Returns
Declaration
Task<IListItem> AddListFolderBatchAsync(string path, string parentFolder = null, string contentTypeId = "0x0120")
Parameters
System.String
path
|
System.String
parentFolder
|
System.String
contentTypeId
|
Returns
Checks if a user has a specific kind of permissions to a list
Declaration
bool CheckIfUserHasPermissions(string userPrincipalName, PermissionKind permissionKind)
Parameters
System.String
userPrincipalName
Login name of the user you wish to check if he has a specific permission
|
PermissionKind
permissionKind
Permission kind to check
|
Returns
System.Boolean
Boolean that says if the user has permissions or not
|
Checks if a user has a specific kind of permissions to a list
Declaration
Task<bool> CheckIfUserHasPermissionsAsync(string userPrincipalName, PermissionKind permissionKind)
Parameters
System.String
userPrincipalName
Login name of the user you wish to check if he has a specific permission
|
PermissionKind
permissionKind
Permission kind to check
|
Returns
Task<System.Boolean>
Boolean that says if the user has permissions or not
|
Classifies and extracts all unprocessed files in the list
Declaration
List<ISyntexClassifyAndExtractResult> ClassifyAndExtract(bool force = false, int pageSize = 500)
Parameters
System.Boolean
force
Also classify and extract files that were processed before
|
System.Int32
pageSize
Page size used when loading the files in this library
|
Returns
Classifies and extracts all unprocessed files in the list
Declaration
Task<List<ISyntexClassifyAndExtractResult>> ClassifyAndExtractAsync(bool force = false, int pageSize = 500)
Parameters
System.Boolean
force
Also classify and extract files that were processed before
|
System.Int32
pageSize
Page size used when loading the files in this library
|
Returns
Classifies and extracts all unprocessed files in the list via the Syntex off-peak queue
Declaration
ISyntexClassifyAndExtractResult ClassifyAndExtractOffPeak()
Returns
Classifies and extracts all unprocessed files in the list via the Syntex off-peak queue
Declaration
Task<ISyntexClassifyAndExtractResult> ClassifyAndExtractOffPeakAsync()
Returns
Clears the default column values set (at folder level) for this library
Declaration
void ClearDefaultColumnValues()
Clears the default column values set (at folder level) for this library
Declaration
Task ClearDefaultColumnValuesAsync()
Returns
Enable audience targeting for a list
Declaration
void EnableAudienceTargeting()
Enable audience targeting for a list
Declaration
Task EnableAudienceTargetingAsync()
Returns
Find files in the list, can be slow as it iterates over all the files in the list. If performance
is key, then try using a search based solution
Declaration
List<IFile> FindFiles(string match)
Parameters
Returns
PnP.Core.Model.SharePoint.List<IFile>
A of found files as type IFile
|
Find files in the list, can be slow as it iterates over all the files in the list. If performance
is key, then try using a search based solution
Declaration
Task<List<IFile>> FindFilesAsync(string match)
Parameters
Returns
Task<PnP.Core.Model.SharePoint.List<IFile>>
A of found files as type IFile
|
Retrieves the compliance tag / retention label for this list
Declaration
IComplianceTag GetComplianceTag()
Returns
Retrieves the compliance tag / retention label for this list
Declaration
Task<IComplianceTag> GetComplianceTagAsync()
Returns
Retrieves the compliance tag / retention label for this list
Declaration
IBatchSingleResult<IComplianceTag> GetComplianceTagBatch()
Returns
Retrieves the compliance tag / retention label for this list
Declaration
IBatchSingleResult<IComplianceTag> GetComplianceTagBatch(Batch batch)
Parameters
Batch
batch
Batch to add this request to
|
Returns
Retrieves the compliance tag / retention label for this list
Declaration
Task<IBatchSingleResult<IComplianceTag>> GetComplianceTagBatchAsync()
Returns
Retrieves the compliance tag / retention label for this list
Declaration
Task<IBatchSingleResult<IComplianceTag>> GetComplianceTagBatchAsync(Batch batch)
Parameters
Batch
batch
Batch to add this request to
|
Returns
Returns the current list or content types in the current order
Declaration
List<string> GetContentTypeOrder()
Returns
PnP.Core.Model.SharePoint.List<System.String>
Ordered list of content type id's, returns null when the list is not enabled to use content types
|
Returns the current list or content types in the current order
Declaration
Task<List<string>> GetContentTypeOrderAsync()
Returns
Task<PnP.Core.Model.SharePoint.List<System.String>>
Ordered list of content type id's, returns null when the list is not enabled to use content types
|
Gets a list of default column values set (at folder level) for this library
Declaration
List<DefaultColumnValueOptions> GetDefaultColumnValues()
Returns
Gets a list of default column values set (at folder level) for this library
Declaration
Task<List<DefaultColumnValueOptions>> GetDefaultColumnValuesAsync()
Returns
Returns a list of flow instances connected to this list
Declaration
List<IFlowInstance> GetFlowInstances()
Returns
PnP.Core.Model.SharePoint.List<IFlowInstance>
List of connected flow instances
|
Returns a list of flow instances connected to this list
Declaration
Task<List<IFlowInstance>> GetFlowInstancesAsync()
Returns
Task<PnP.Core.Model.SharePoint.List<IFlowInstance>>
List of connected flow instances
|
Returns a list of flow instances connected to this list
Declaration
IEnumerableBatchResult<IFlowInstance> GetFlowInstancesBatch()
Returns
Returns a list of flow instances connected to this list
Declaration
IEnumerableBatchResult<IFlowInstance> GetFlowInstancesBatch(Batch batch)
Parameters
Batch
batch
Batch to add this request to
|
Returns
Returns a list of flow instances connected to this list
Declaration
Task<IEnumerableBatchResult<IFlowInstance>> GetFlowInstancesBatchAsync()
Returns
Returns a list of flow instances connected to this list
Declaration
Task<IEnumerableBatchResult<IFlowInstance>> GetFlowInstancesBatchAsync(Batch batch)
Parameters
Batch
batch
Batch to add this request to
|
Returns
Gets the user effective permissions of a user for a list
Declaration
IBasePermissions GetUserEffectivePermissions(string userPrincipalName)
Parameters
System.String
userPrincipalName
Login name of the user you wish to retrieve the permissions of
|
Returns
IBasePermissions
Base permissions object that contains the High and the Low permissions
|
Gets the user effective permissions of a user for a list
Declaration
Task<IBasePermissions> GetUserEffectivePermissionsAsync(string userPrincipalName)
Parameters
System.String
userPrincipalName
Login name of the user you wish to retrieve the permissions of
|
Returns
Task<IBasePermissions>
Base permissions object that contains the High and the Low permissions
|
Loads list items based up on a CAML query
Declaration
void LoadItemsByCamlQuery(CamlQueryOptions queryOptions, params Expression<Func<IListItem, object>>[] selectors)
Parameters
Loads list items based up on a CAML query
Declaration
void LoadItemsByCamlQuery(string query, params Expression<Func<IListItem, object>>[] selectors)
Parameters
System.String
query
query to execute
|
Expression<Func<IListItem, System.Object>>[]
selectors
The expressions declaring the fields to select
|
Loads list items based up on a CAML query
Declaration
Task LoadItemsByCamlQueryAsync(CamlQueryOptions queryOptions, params Expression<Func<IListItem, object>>[] selectors)
Parameters
Returns
Loads list items based up on a CAML query
Declaration
Task LoadItemsByCamlQueryAsync(string query, params Expression<Func<IListItem, object>>[] selectors)
Parameters
System.String
query
query to execute
|
Expression<Func<IListItem, System.Object>>[]
selectors
The expressions declaring the fields to select
|
Returns
Loads list items based up on a CAML query
Declaration
void LoadItemsByCamlQueryBatch(CamlQueryOptions queryOptions, params Expression<Func<IListItem, object>>[] selectors)
Parameters
Loads list items based up on a CAML query
Declaration
void LoadItemsByCamlQueryBatch(Batch batch, CamlQueryOptions queryOptions, params Expression<Func<IListItem, object>>[] selectors)
Parameters
Loads list items based up on a CAML query
Declaration
void LoadItemsByCamlQueryBatch(Batch batch, string query, params Expression<Func<IListItem, object>>[] selectors)
Parameters
Batch
batch
Batch to add this request to
|
System.String
query
query to execute
|
Expression<Func<IListItem, System.Object>>[]
selectors
The expressions declaring the fields to select
|
Loads list items based up on a CAML query
Declaration
void LoadItemsByCamlQueryBatch(string query, params Expression<Func<IListItem, object>>[] selectors)
Parameters
System.String
query
query to execute
|
Expression<Func<IListItem, System.Object>>[]
selectors
The expressions declaring the fields to select
|
Loads list items based up on a CAML query
Declaration
Task LoadItemsByCamlQueryBatchAsync(CamlQueryOptions queryOptions, params Expression<Func<IListItem, object>>[] selectors)
Parameters
Returns
Loads list items based up on a CAML query
Declaration
Task LoadItemsByCamlQueryBatchAsync(Batch batch, CamlQueryOptions queryOptions, params Expression<Func<IListItem, object>>[] selectors)
Parameters
Returns
Loads list items based up on a CAML query
Declaration
Task LoadItemsByCamlQueryBatchAsync(Batch batch, string query, params Expression<Func<IListItem, object>>[] selectors)
Parameters
Batch
batch
Batch to add this request to
|
System.String
query
query to execute
|
Expression<Func<IListItem, System.Object>>[]
selectors
The expressions declaring the fields to select
|
Returns
Loads list items based up on a CAML query
Declaration
Task LoadItemsByCamlQueryBatchAsync(string query, params Expression<Func<IListItem, object>>[] selectors)
Parameters
System.String
query
query to execute
|
Expression<Func<IListItem, System.Object>>[]
selectors
The expressions declaring the fields to select
|
Returns
Loads list items based up on a CAML query and the RenderListDataAsStream API
Declaration
Dictionary<string, object> LoadListDataAsStream(RenderListDataOptions renderOptions)
Parameters
Returns
Dictionary<System.String, System.Object>
|
Loads list items based up on a CAML query and the RenderListDataAsStream API
Declaration
Task<Dictionary<string, object>> LoadListDataAsStreamAsync(RenderListDataOptions renderOptions)
Parameters
Returns
Task<Dictionary<System.String, System.Object>>
|
Loads list items based up on a CAML query and the RenderListDataAsStream API
Declaration
IBatchSingleResult<Dictionary<string, object>> LoadListDataAsStreamBatch(RenderListDataOptions renderOptions)
Parameters
Returns
Loads list items based up on a CAML query and the RenderListDataAsStream API
Declaration
IBatchSingleResult<Dictionary<string, object>> LoadListDataAsStreamBatch(Batch batch, RenderListDataOptions renderOptions)
Parameters
Returns
Loads list items based up on a CAML query and the RenderListDataAsStream API
Declaration
Task<IBatchSingleResult<Dictionary<string, object>>> LoadListDataAsStreamBatchAsync(RenderListDataOptions renderOptions)
Parameters
Returns
Loads list items based up on a CAML query and the RenderListDataAsStream API
Declaration
Task<IBatchSingleResult<Dictionary<string, object>>> LoadListDataAsStreamBatchAsync(Batch batch, RenderListDataOptions renderOptions)
Parameters
Returns
Moves this list into the site collection recycle bin, returns the recyle bin item id
Declaration
Returns
Guid
Id of the recycle bin item
|
Moves this list into the site collection recycle bin, returns the recyle bin item id
Declaration
Task<Guid> RecycleAsync()
Returns
Task<Guid>
Id of the recycle bin item
|
Moves this list into the site collection recycle bin, returns the recyle bin item id
Declaration
IBatchSingleResult<BatchResultValue<Guid>> RecycleBatch()
Returns
Moves this list into the site collection recycle bin, returns the recyle bin item id
Declaration
IBatchSingleResult<BatchResultValue<Guid>> RecycleBatch(Batch batch)
Parameters
Batch
batch
Batch to add the request to
|
Returns
Moves this list into the site collection recycle bin, returns the recyle bin item id
Declaration
Task<IBatchSingleResult<BatchResultValue<Guid>>> RecycleBatchAsync()
Returns
Moves this list into the site collection recycle bin, returns the recyle bin item id
Declaration
Task<IBatchSingleResult<BatchResultValue<Guid>>> RecycleBatchAsync(Batch batch)
Parameters
Batch
batch
Batch to add the request to
|
Returns
Reorders the content types on the list. This controls the order of content types in the "New" menu and "List Settings" page
Declaration
void ReorderContentTypes(List<string> contentTypeIdList)
Parameters
PnP.Core.Model.SharePoint.List<System.String>
contentTypeIdList
Ordered list of content type ids to set
|
Reorders the content types on the list. This controls the order of content types in the "New" menu and "List Settings" page
Declaration
Task ReorderContentTypesAsync(List<string> contentTypeIdList)
Parameters
PnP.Core.Model.SharePoint.List<System.String>
contentTypeIdList
Ordered list of content type ids to set
|
Returns
Sets a compliance tag / retention label for this list
Declaration
void SetComplianceTag(string complianceTagValue, bool blockDelete, bool blockEdit, bool syncToItems)
Parameters
System.String
complianceTagValue
Compliance tag
|
System.Boolean
blockDelete
Prevent deletion of the list (Hold)
|
System.Boolean
blockEdit
Prevent editing of the list (Record)
|
System.Boolean
syncToItems
If true the compliance tag is synced to the list items in this list
|
Sets a compliance tag / retention label for this list
Declaration
Task SetComplianceTagAsync(string complianceTagValue, bool blockDelete, bool blockEdit, bool syncToItems)
Parameters
System.String
complianceTagValue
Compliance tag
|
System.Boolean
blockDelete
Prevent deletion of the list (Hold)
|
System.Boolean
blockEdit
Prevent editing of the list (Record)
|
System.Boolean
syncToItems
If true the compliance tag is synced to the list items in this list
|
Returns
Sets a compliance tag / retention label for this list
Declaration
void SetComplianceTagBatch(Batch batch, string complianceTagValue, bool blockDelete, bool blockEdit, bool syncToItems)
Parameters
Batch
batch
Batch to add this request to
|
System.String
complianceTagValue
Compliance tag
|
System.Boolean
blockDelete
Prevent deletion of the list (Hold)
|
System.Boolean
blockEdit
Prevent editing of the list (Record)
|
System.Boolean
syncToItems
If true the compliance tag is synced to the list items in this list
|
Sets a compliance tag / retention label for this list
Declaration
void SetComplianceTagBatch(string complianceTagValue, bool blockDelete, bool blockEdit, bool syncToItems)
Parameters
System.String
complianceTagValue
Compliance tag
|
System.Boolean
blockDelete
Prevent deletion of the list (Hold)
|
System.Boolean
blockEdit
Prevent editing of the list (Record)
|
System.Boolean
syncToItems
If true the compliance tag is synced to the list items in this list
|
Sets a compliance tag / retention label for this list
Declaration
Task SetComplianceTagBatchAsync(Batch batch, string complianceTagValue, bool blockDelete, bool blockEdit, bool syncToItems)
Parameters
Batch
batch
Batch to add this request to
|
System.String
complianceTagValue
Compliance tag
|
System.Boolean
blockDelete
Prevent deletion of the list (Hold)
|
System.Boolean
blockEdit
Prevent editing of the list (Record)
|
System.Boolean
syncToItems
If true the compliance tag is synced to the list items in this list
|
Returns
Sets a compliance tag / retention label for this list
Declaration
Task SetComplianceTagBatchAsync(string complianceTagValue, bool blockDelete, bool blockEdit, bool syncToItems)
Parameters
System.String
complianceTagValue
Compliance tag
|
System.Boolean
blockDelete
Prevent deletion of the list (Hold)
|
System.Boolean
blockEdit
Prevent editing of the list (Record)
|
System.Boolean
syncToItems
If true the compliance tag is synced to the list items in this list
|
Returns
Sets the default column value settings (at folder level) for this library
Declaration
void SetDefaultColumnValues(List<DefaultColumnValueOptions> defaultColumnValues)
Parameters
Sets the default column value settings (at folder level) for this library
Declaration
Task SetDefaultColumnValuesAsync(List<DefaultColumnValueOptions> defaultColumnValues)
Parameters
Returns
Extension Methods