Table of Contents

Interface IListCollection

Namespace
PnP.Core.Model.SharePoint
Assembly
PnP.Core.dll

Public interface to define a collection of List objects of SharePoint Online

public interface IListCollection : IQueryable<IList>, IQueryable, IAsyncEnumerable<IList>, IDataModelCollection<IList>, IEnumerable<IList>, IEnumerable, IDataModelParent, IDataModelWithContext, IRequestableCollection, IDataModelCollectionLoad<IList>, IDataModelCollectionDeleteByGuidId, ISupportModules<IListCollection>
Inherited Members
Extension Methods

Methods

Add(string, ListTemplateType)

Adds a new list

IList Add(string title, ListTemplateType templateType)

Parameters

title string

Title of the list

templateType ListTemplateType

Template type

Returns

IList

Newly added list

AddAsync(string, ListTemplateType)

Adds a new list

Task<IList> AddAsync(string title, ListTemplateType templateType)

Parameters

title string

Title of the list

templateType ListTemplateType

Template type

Returns

Task<IList>

Newly added list

AddBatch(Batch, string, ListTemplateType)

Adds a new list

IList AddBatch(Batch batch, string title, ListTemplateType templateType)

Parameters

batch Batch

Batch to use

title string

Title of the list

templateType ListTemplateType

Template type

Returns

IList

Newly added list

AddBatch(string, ListTemplateType)

Adds a new list

IList AddBatch(string title, ListTemplateType templateType)

Parameters

title string

Title of the list

templateType ListTemplateType

Template type

Returns

IList

Newly added list

AddBatchAsync(Batch, string, ListTemplateType)

Adds a new list

Task<IList> AddBatchAsync(Batch batch, string title, ListTemplateType templateType)

Parameters

batch Batch

Batch to use

title string

Title of the list

templateType ListTemplateType

Template type

Returns

Task<IList>

Newly added list

AddBatchAsync(string, ListTemplateType)

Adds a new list

Task<IList> AddBatchAsync(string title, ListTemplateType templateType)

Parameters

title string

Title of the list

templateType ListTemplateType

Template type

Returns

Task<IList>

Newly added list

EnsureSiteAssetsLibrary(params Expression<Func<IList, object>>[])

Ensures there's an Asset Library in the site, if not present it will be created

IList EnsureSiteAssetsLibrary(params Expression<Func<IList, object>>[] selectors)

Parameters

selectors Expression<Func<IList, object>>[]

The expressions declaring the fields to select

Returns

IList

The asset library

EnsureSiteAssetsLibraryAsync(params Expression<Func<IList, object>>[])

Ensures there's an Asset Library in the site, if not present it will be created

Task<IList> EnsureSiteAssetsLibraryAsync(params Expression<Func<IList, object>>[] selectors)

Parameters

selectors Expression<Func<IList, object>>[]

The expressions declaring the fields to select

Returns

Task<IList>

The asset library

EnsureSiteAssetsLibraryBatch(Batch, params Expression<Func<IList, object>>[])

Ensures there's an Asset Library in the site, if not present it will be created

IList EnsureSiteAssetsLibraryBatch(Batch batch, params Expression<Func<IList, object>>[] selectors)

Parameters

batch Batch

Batch to add this request to

selectors Expression<Func<IList, object>>[]

The expressions declaring the fields to select

Returns

IList

The asset library

EnsureSiteAssetsLibraryBatch(params Expression<Func<IList, object>>[])

Ensures there's an Asset Library in the site, if not present it will be created

IList EnsureSiteAssetsLibraryBatch(params Expression<Func<IList, object>>[] selectors)

Parameters

selectors Expression<Func<IList, object>>[]

The expressions declaring the fields to select

Returns

IList

The asset library

EnsureSiteAssetsLibraryBatchAsync(Batch, params Expression<Func<IList, object>>[])

Ensures there's an Asset Library in the site, if not present it will be created

Task<IList> EnsureSiteAssetsLibraryBatchAsync(Batch batch, params Expression<Func<IList, object>>[] selectors)

Parameters

batch Batch

Batch to add this request to

selectors Expression<Func<IList, object>>[]

The expressions declaring the fields to select

Returns

Task<IList>

The asset library

EnsureSiteAssetsLibraryBatchAsync(params Expression<Func<IList, object>>[])

Ensures there's an Asset Library in the site, if not present it will be created

Task<IList> EnsureSiteAssetsLibraryBatchAsync(params Expression<Func<IList, object>>[] selectors)

Parameters

selectors Expression<Func<IList, object>>[]

The expressions declaring the fields to select

Returns

Task<IList>

The asset library

GetById(Guid, params Expression<Func<IList, object>>[])

Method to select a list by id

IList GetById(Guid id, params Expression<Func<IList, object>>[] selectors)

Parameters

id Guid

The id to search for

selectors Expression<Func<IList, object>>[]

The expressions declaring the fields to select

Returns

IList

The resulting list instance, if any

GetByIdAsync(Guid, params Expression<Func<IList, object>>[])

Method to select a list by id

Task<IList> GetByIdAsync(Guid id, params Expression<Func<IList, object>>[] selectors)

Parameters

id Guid

The id to search for

selectors Expression<Func<IList, object>>[]

The expressions declaring the fields to select

Returns

Task<IList>

The resulting list instance, if any

GetByIdBatch(Batch, Guid, params Expression<Func<IList, object>>[])

Method to select a list by id

IList GetByIdBatch(Batch batch, Guid id, params Expression<Func<IList, object>>[] selectors)

Parameters

batch Batch

Batch to add this request to

id Guid

The id to search for

selectors Expression<Func<IList, object>>[]

The expressions declaring the fields to select

Returns

IList

The resulting list instance, if any

GetByIdBatch(Guid, params Expression<Func<IList, object>>[])

Method to select a list by id

IList GetByIdBatch(Guid id, params Expression<Func<IList, object>>[] selectors)

Parameters

id Guid

The id to search for

selectors Expression<Func<IList, object>>[]

The expressions declaring the fields to select

Returns

IList

The resulting list instance, if any

GetByIdBatchAsync(Batch, Guid, params Expression<Func<IList, object>>[])

Method to select a list by id

Task<IList> GetByIdBatchAsync(Batch batch, Guid id, params Expression<Func<IList, object>>[] selectors)

Parameters

batch Batch

Batch to add this request to

id Guid

The id to search for

selectors Expression<Func<IList, object>>[]

The expressions declaring the fields to select

Returns

Task<IList>

The resulting list instance, if any

GetByIdBatchAsync(Guid, params Expression<Func<IList, object>>[])

Method to select a list by id

Task<IList> GetByIdBatchAsync(Guid id, params Expression<Func<IList, object>>[] selectors)

Parameters

id Guid

The id to search for

selectors Expression<Func<IList, object>>[]

The expressions declaring the fields to select

Returns

Task<IList>

The resulting list instance, if any

GetByServerRelativeUrl(string, params Expression<Func<IList, object>>[])

Method to select a list by server relative url

IList GetByServerRelativeUrl(string serverRelativeUrl, params Expression<Func<IList, object>>[] selectors)

Parameters

serverRelativeUrl string

The server relative url of the list to return

selectors Expression<Func<IList, object>>[]

The expressions declaring the fields to select

Returns

IList

The resulting list instance, if any

GetByServerRelativeUrlAsync(string, params Expression<Func<IList, object>>[])

Method to select a list by server relative url

Task<IList> GetByServerRelativeUrlAsync(string serverRelativeUrl, params Expression<Func<IList, object>>[] selectors)

Parameters

serverRelativeUrl string

The server relative url of the list to return

selectors Expression<Func<IList, object>>[]

The expressions declaring the fields to select

Returns

Task<IList>

The resulting list instance, if any

GetByServerRelativeUrlBatch(Batch, string, params Expression<Func<IList, object>>[])

Method to select a list by server relative url

IList GetByServerRelativeUrlBatch(Batch batch, string serverRelativeUrl, params Expression<Func<IList, object>>[] selectors)

Parameters

batch Batch

Batch to add this request to

serverRelativeUrl string

The server relative url of the list to return

selectors Expression<Func<IList, object>>[]

The expressions declaring the fields to select

Returns

IList

The resulting list instance, if any

GetByServerRelativeUrlBatch(string, params Expression<Func<IList, object>>[])

Method to select a list by server relative url

IList GetByServerRelativeUrlBatch(string serverRelativeUrl, params Expression<Func<IList, object>>[] selectors)

Parameters

serverRelativeUrl string

The server relative url of the list to return

selectors Expression<Func<IList, object>>[]

The expressions declaring the fields to select

Returns

IList

The resulting list instance, if any

GetByServerRelativeUrlBatchAsync(Batch, string, params Expression<Func<IList, object>>[])

Method to select a list by server relative url

Task<IList> GetByServerRelativeUrlBatchAsync(Batch batch, string serverRelativeUrl, params Expression<Func<IList, object>>[] selectors)

Parameters

batch Batch

Batch to add this request to

serverRelativeUrl string

The server relative url of the list to return

selectors Expression<Func<IList, object>>[]

The expressions declaring the fields to select

Returns

Task<IList>

The resulting list instance, if any

GetByServerRelativeUrlBatchAsync(string, params Expression<Func<IList, object>>[])

Method to select a list by server relative url

Task<IList> GetByServerRelativeUrlBatchAsync(string serverRelativeUrl, params Expression<Func<IList, object>>[] selectors)

Parameters

serverRelativeUrl string

The server relative url of the list to return

selectors Expression<Func<IList, object>>[]

The expressions declaring the fields to select

Returns

Task<IList>

The resulting list instance, if any

GetByTitle(string, params Expression<Func<IList, object>>[])

Select a list by title

IList GetByTitle(string title, params Expression<Func<IList, object>>[] selectors)

Parameters

title string

The title to search for

selectors Expression<Func<IList, object>>[]

The expressions declaring the fields to select

Returns

IList

The resulting list instance, if any

GetByTitleAsync(string, params Expression<Func<IList, object>>[])

Select a list by title

Task<IList> GetByTitleAsync(string title, params Expression<Func<IList, object>>[] selectors)

Parameters

title string

The title to search for

selectors Expression<Func<IList, object>>[]

The expressions declaring the fields to select

Returns

Task<IList>

The resulting list instance, if any

GetByTitleBatch(Batch, string, params Expression<Func<IList, object>>[])

Select a list by title

IList GetByTitleBatch(Batch batch, string title, params Expression<Func<IList, object>>[] selectors)

Parameters

batch Batch

Batch to add this request to

title string

The title to search for

selectors Expression<Func<IList, object>>[]

The expressions declaring the fields to select

Returns

IList

The resulting list instance, if any

GetByTitleBatch(string, params Expression<Func<IList, object>>[])

Select a list by title

IList GetByTitleBatch(string title, params Expression<Func<IList, object>>[] selectors)

Parameters

title string

The title to search for

selectors Expression<Func<IList, object>>[]

The expressions declaring the fields to select

Returns

IList

The resulting list instance, if any

GetByTitleBatchAsync(Batch, string, params Expression<Func<IList, object>>[])

Select a list by title

Task<IList> GetByTitleBatchAsync(Batch batch, string title, params Expression<Func<IList, object>>[] selectors)

Parameters

batch Batch

Batch to add this request to

title string

The title to search for

selectors Expression<Func<IList, object>>[]

The expressions declaring the fields to select

Returns

Task<IList>

The resulting list instance, if any

GetByTitleBatchAsync(string, params Expression<Func<IList, object>>[])

Select a list by title

Task<IList> GetByTitleBatchAsync(string title, params Expression<Func<IList, object>>[] selectors)

Parameters

title string

The title to search for

selectors Expression<Func<IList, object>>[]

The expressions declaring the fields to select

Returns

Task<IList>

The resulting list instance, if any