Table of Contents

Interface IContentTypeCollection

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

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

public interface IContentTypeCollection : IQueryable<IContentType>, IQueryable, IAsyncEnumerable<IContentType>, IDataModelCollection<IContentType>, IEnumerable<IContentType>, IEnumerable, IDataModelParent, IDataModelWithContext, IRequestableCollection, IDataModelCollectionLoad<IContentType>, ISupportModules<IContentTypeCollection>
Inherited Members
Extension Methods

Methods

Add(string, string, string, string)

Add a content type Check the documentation for a well formed Content Type Id: https://docs.microsoft.com/en-us/previous-versions/office/developer/sharepoint-2010/aa543822(v=office.14)

IContentType Add(string id, string name, string description = null, string group = null)

Parameters

id string

Id of the content type

name string

Name of the content type

description string

Description of the content type

group string

Group of the content type

Returns

IContentType

The newly added content type

AddAsync(string, string, string, string)

Add a content type Check the documentation for a well formed Content Type Id: https://docs.microsoft.com/en-us/previous-versions/office/developer/sharepoint-2010/aa543822(v=office.14)

Task<IContentType> AddAsync(string id, string name, string description = null, string group = null)

Parameters

id string

Id of the content type

name string

Name of the content type

description string

Description of the content type

group string

Group of the content type

Returns

Task<IContentType>

The newly added content type

AddAvailableContentType(string)

Add an existing content type

IContentType AddAvailableContentType(string id)

Parameters

id string

Id of the content type

Returns

IContentType

The newly added content type

AddAvailableContentTypeAsync(string)

Add an existing content type

Task<IContentType> AddAvailableContentTypeAsync(string id)

Parameters

id string

Id of the content type

Returns

Task<IContentType>

The newly added content type

AddAvailableContentTypeBatch(Batch, string)

Add an existing content type

IContentType AddAvailableContentTypeBatch(Batch batch, string id)

Parameters

batch Batch

Batch to use

id string

Id of the content type

Returns

IContentType

The newly added content type

AddAvailableContentTypeBatch(string)

Add an existing content type

IContentType AddAvailableContentTypeBatch(string id)

Parameters

id string

Id of the content type

Returns

IContentType

The newly added content type

AddAvailableContentTypeBatchAsync(Batch, string)

Add an existing content type

Task<IContentType> AddAvailableContentTypeBatchAsync(Batch batch, string id)

Parameters

batch Batch

Batch to use

id string

Id of the content type

Returns

Task<IContentType>

The newly added content type

AddAvailableContentTypeBatchAsync(string)

Add an existing content type

Task<IContentType> AddAvailableContentTypeBatchAsync(string id)

Parameters

id string

Id of the content type

Returns

Task<IContentType>

The newly added content type

AddAvailableContentTypeFromHub(string, AddContentTypeFromHubOptions)

Add a content type from the content type hub

ILongRunningOperation AddAvailableContentTypeFromHub(string id, AddContentTypeFromHubOptions options = null)

Parameters

id string

Id of the content type

options AddContentTypeFromHubOptions

Getting a content type from the hub might be async depending on current system load, optionnally provide options to control how if and how the waiting will happen

Returns

ILongRunningOperation

Null if the add was actually done, a ILongRunningOperation instance otherwise (e.g. when async and you've not chosen to wait for completion)

AddAvailableContentTypeFromHubAsync(string, AddContentTypeFromHubOptions)

Add a content type from the content type hub

Task<ILongRunningOperation> AddAvailableContentTypeFromHubAsync(string id, AddContentTypeFromHubOptions options = null)

Parameters

id string

Id of the content type

options AddContentTypeFromHubOptions

Getting a content type from the hub might be async depending on current system load, optionnally provide options to control how if and how the waiting will happen

Returns

Task<ILongRunningOperation>

Null if the add was actually done, a ILongRunningOperation instance otherwise (e.g. when async and you've not chosen to wait for completion)

AddBatch(Batch, string, string, string, string)

Add a content type Check the documentation for a well formed Content Type Id: https://docs.microsoft.com/en-us/previous-versions/office/developer/sharepoint-2010/aa543822(v=office.14)

IContentType AddBatch(Batch batch, string id, string name, string description = null, string group = null)

Parameters

batch Batch

Batch to use

id string

Id of the content type

name string

Name of the content type

description string

Description of the content type

group string

Group of the content type

Returns

IContentType

The newly added content type

AddBatch(string, string, string, string)

Add a content type Check the documentation for a well formed Content Type Id: https://docs.microsoft.com/en-us/previous-versions/office/developer/sharepoint-2010/aa543822(v=office.14)

IContentType AddBatch(string id, string name, string description = null, string group = null)

Parameters

id string

Id of the content type

name string

Name of the content type

description string

Description of the content type

group string

Group of the content type

Returns

IContentType

The newly added content type

AddBatchAsync(Batch, string, string, string, string)

Add a content type Check the documentation for a well formed Content Type Id: https://docs.microsoft.com/en-us/previous-versions/office/developer/sharepoint-2010/aa543822(v=office.14)

Task<IContentType> AddBatchAsync(Batch batch, string id, string name, string description = null, string group = null)

Parameters

batch Batch

Batch to use

id string

Id of the content type

name string

Name of the content type

description string

Description of the content type

group string

Group of the content type

Returns

Task<IContentType>

The newly added content type

AddBatchAsync(string, string, string, string)

Add a content type Check the documentation for a well formed Content Type Id: https://docs.microsoft.com/en-us/previous-versions/office/developer/sharepoint-2010/aa543822(v=office.14)

Task<IContentType> AddBatchAsync(string id, string name, string description = null, string group = null)

Parameters

id string

Id of the content type

name string

Name of the content type

description string

Description of the content type

group string

Group of the content type

Returns

Task<IContentType>

The newly added content type

AddDocumentSet(string, string, string, string, DocumentSetOptions)

Creates a document set

IDocumentSet AddDocumentSet(string id, string name, string description = null, string group = null, DocumentSetOptions options = null)

Parameters

id string

Id of the document set

name string

Name of the document set

description string

Description of the document set

group string

Group of the document set

options DocumentSetOptions

Options for creating the document set

Returns

IDocumentSet

The newly added document set

AddDocumentSetAsync(string, string, string, string, DocumentSetOptions)

Creates a document set

Task<IDocumentSet> AddDocumentSetAsync(string id, string name, string description = null, string group = null, DocumentSetOptions options = null)

Parameters

id string

Id of the document set

name string

Name of the document set

description string

Description of the document set

group string

Group of the document set

options DocumentSetOptions

Options for creating the document set

Returns

Task<IDocumentSet>

The newly added document set