November Happy Hour will be moved to Thursday December 5th.

Class ContentTypeDB

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice.

Inheritance
System.Object
ContentTypeDB
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.DataAccess.Internal
Assembly: EPiServer.dll
Version: 11.20.7
Syntax
[ServiceConfiguration(Lifecycle = ServiceInstanceScope.Singleton)]
public class ContentTypeDB

Constructors

ContentTypeDB()

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice.

Declaration
protected ContentTypeDB()

ContentTypeDB(ServiceAccessor<IDatabaseExecutor>, IPropertyDefinitionRepository, IPropertySettingsRepository, DatabaseDateTimeHandler, ISynchronizedObjectInstanceCache, IPrincipalAccessor, IContentTypeBaseResolver, IContentModelUsage, IPropertyDefinitionTypeRepository)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Initializes a new instance of the ContentTypeDB class.

Declaration
public ContentTypeDB(ServiceAccessor<IDatabaseExecutor> databaseHandlerAccessor, IPropertyDefinitionRepository propertyDefinitionRepository, IPropertySettingsRepository settingsRepository, DatabaseDateTimeHandler dateTimeHandler, ISynchronizedObjectInstanceCache cacheInstance, IPrincipalAccessor principalAccessor, IContentTypeBaseResolver contentTypeBaseResolver, IContentModelUsage contentModelUsage, IPropertyDefinitionTypeRepository propertyDefinitionTypeRepository)
Parameters
Type Name Description
ServiceAccessor<IDatabaseExecutor> databaseHandlerAccessor
IPropertyDefinitionRepository propertyDefinitionRepository
IPropertySettingsRepository settingsRepository
DatabaseDateTimeHandler dateTimeHandler
ISynchronizedObjectInstanceCache cacheInstance
IPrincipalAccessor principalAccessor
IContentTypeBaseResolver contentTypeBaseResolver
IContentModelUsage contentModelUsage
IPropertyDefinitionTypeRepository propertyDefinitionTypeRepository
Remarks

This member supports the EPiServer infrastructure and is not intended to be used directly from your code.

Fields

UseContentTypeSavedByKey

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. This member supports the EPiServer infrastructure and is not intended to be used directly from your code.

Declaration
public const string UseContentTypeSavedByKey = "ContentTypeRepository:SavedBy"
Field Value
Type Description
System.String

UseContentTypeSavedKey

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. This member supports the EPiServer infrastructure and is not intended to be used directly from your code.

Declaration
public const string UseContentTypeSavedKey = "ContentTypeRepository:Saved"
Field Value
Type Description
System.String

Properties

UseContentTypeSaved

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Indicates whether save time is taken from ContentType instance or set by the save method. If true Saved property on ContentType instance is used else time is set to DateTime.Now.

Declaration
public static bool UseContentTypeSaved { get; }
Property Value
Type Description
System.Boolean

UseContentTypeSavedBy

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Indicates whether saved by is taken from ContentType instance or set by the save method. If true SavedBy property on ContentType instance is used else current user.

Declaration
public static bool UseContentTypeSavedBy { get; }
Property Value
Type Description
System.Boolean

Methods

ClearCache()

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Clears the cache.

Declaration
public static void ClearCache()

Delete(ContentType)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Deletes a ContentType from the data repository.

Declaration
public virtual void Delete(ContentType contentType)
Parameters
Type Name Description
ContentType contentType

List()

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Lists all ContentTypes in the data repository.

Declaration
public virtual IEnumerable<ContentType> List()
Returns
Type Description
System.Collections.Generic.IEnumerable<ContentType>

Enumeration of ContentTypes.

OnModelTypeChanged(ContentType)

Declaration
protected static void OnModelTypeChanged(ContentType contentType)
Parameters
Type Name Description
ContentType contentType

OnRepositoryUpdated(ContentType, RepositoryEventType)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Called to raise the repository updated event

Declaration
protected static void OnRepositoryUpdated(ContentType contentType, RepositoryEventType eventType)
Parameters
Type Name Description
ContentType contentType

Type of the content.

RepositoryEventType eventType

Type of the event.

Save(ContentType)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Saves the specified content type to the data repository.

Declaration
public virtual void Save(ContentType contentType)
Parameters
Type Name Description
ContentType contentType

The content type to save.

Remarks

This member supports the EPiServer infrastructure and is not intended to be used directly from your code.

Save(IEnumerable<ContentType>)

Declaration
public virtual void Save(IEnumerable<ContentType> contentTypes)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<ContentType> contentTypes

SaveIncludingPropertyDefinitions(ContentType)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Saves the content type and all its property definitions.

Declaration
public virtual int SaveIncludingPropertyDefinitions(ContentType contentType)
Parameters
Type Name Description
ContentType contentType

The content type.

Returns
Type Description
System.Int32

A copy of the content type, including its property definitions.

Events

ModelTypeChanged

Declaration
public static event EventHandler<RepositoryEventArgs> ModelTypeChanged
Event Type
Type Description
System.EventHandler<RepositoryEventArgs>

RepositoryUpdated

Declaration
public static event EventHandler<RepositoryEventArgs> RepositoryUpdated
Event Type
Type Description
System.EventHandler<RepositoryEventArgs>

Extension Methods