Class ContentTypeBaseServiceProvider
Inheritance
object
Namespace: Umbraco.Cms.Core.Services
Assembly: Umbraco.Core.dll
Syntax
public class ContentTypeBaseServiceProvider : IContentTypeBaseServiceProvider
Constructors
View SourceContentTypeBaseServiceProvider(IContentTypeService, IMediaTypeService, IMemberTypeService)
Declaration
public ContentTypeBaseServiceProvider(IContentTypeService contentTypeService, IMediaTypeService mediaTypeService, IMemberTypeService memberTypeService)
Parameters
| Type | Name | Description |
|---|---|---|
| IContentTypeService | contentTypeService | |
| IMediaTypeService | mediaTypeService | |
| IMemberTypeService | memberTypeService |
Methods
View SourceFor(IContentBase)
Gets the content type service base managing types for the specified content base.
Declaration
public IContentTypeBaseService For(IContentBase contentBase)
Parameters
| Type | Name | Description |
|---|---|---|
| IContentBase | contentBase |
Returns
| Type | Description |
|---|---|
| IContentTypeBaseService |
Remarks
If contentBase is an IContent, this returns the
IContentTypeService, and if it's an IMedia, this returns
the IMediaTypeService, etc.
Services are returned as IContentTypeBaseService and can be used to retrieve the content / media / whatever type as IContentTypeComposition.
GetContentTypeOf(IContentBase)
Gets the content type of an IContentBase object.
Declaration
public IContentTypeComposition? GetContentTypeOf(IContentBase contentBase)
Parameters
| Type | Name | Description |
|---|---|---|
| IContentBase | contentBase |
Returns
| Type | Description |
|---|---|
| IContentTypeComposition |