Class DefaultContentTypeRepository
This class supports the EPiServer infrastructure and is not intended to be used directly from your code.
Inherited Members
Namespace: EPiServer.DataAbstraction
Assembly: EPiServer.dll
Version: 8.11.0Syntax
[ServiceConfiguration(ServiceType = typeof(IContentTypeRepository))]
[ServiceConfiguration(ServiceType = typeof(IContentTypeRepository<ContentType>))]
public class DefaultContentTypeRepository : ContentTypeRepository, IContentTypeRepository, IContentTypeRepository<ContentType>, ICachedRepositoryConstructors
DefaultContentTypeRepository(ContentTypeModelRepository, ServiceAccessor<ContentTypeDB>, ModelMerger, ITabDefinitionRepository, IPropertyDefinitionTypeRepository, TypeReferenceAnalyzer, IPropertyDefinitionRepository)
Initializes a new instance of the DefaultContentTypeRepository class.
Declaration
public DefaultContentTypeRepository(ContentTypeModelRepository modelRepository, ServiceAccessor<ContentTypeDB> pageTypeDataAccess, ModelMerger modelMerger, ITabDefinitionRepository tabDefinitionRepository, IPropertyDefinitionTypeRepository propertyDefinitionTypeRepository, TypeReferenceAnalyzer circularReferenceValidator, IPropertyDefinitionRepository propertyDefinitionRepository)Parameters
| Type | Name | Description | 
|---|---|---|
| ContentTypeModelRepository | modelRepository | The model repository. | 
| ServiceAccessor<ContentTypeDB> | pageTypeDataAccess | The page type data access object to be used by this instance. | 
| ModelMerger | modelMerger | The model merger that should be used by this instance. | 
| ITabDefinitionRepository | tabDefinitionRepository | The tab definition repository that should be used by this instance. | 
| IPropertyDefinitionTypeRepository | propertyDefinitionTypeRepository | The property definition type repository that should be used by this instance. | 
| TypeReferenceAnalyzer | circularReferenceValidator | The circular reference validator that should be used by this instance. | 
| IPropertyDefinitionRepository | propertyDefinitionRepository | The property definition repository that should be used by this instance. | 
Methods
ClearCache()
Clears the local content type cache.
Declaration
public static void ClearCache()Copy(ContentType)
Creates a copy of the specified content type in the data repository and returns it.
Declaration
public override ContentType Copy(ContentType contentType)Parameters
| Type | Name | Description | 
|---|---|---|
| ContentType | contentType | The ContentType to be copied. | 
Returns
| Type | Description | 
|---|---|
| ContentType | The copy of the ContentType that was provided. | 
Overrides
Delete(ContentType)
Deletes a ContentType from the data repository.
Declaration
public override void Delete(ContentType contentType)Parameters
| Type | Name | Description | 
|---|---|---|
| ContentType | contentType | 
Overrides
List()
Lists all ContentTypes in the data repository.
Declaration
public override IEnumerable<ContentType> List()Returns
| Type | Description | 
|---|---|
| System.Collections.Generic.IEnumerable<ContentType> | Enumeration of ContentTypes. | 
Overrides
Load(Guid)
Loads a ContentType with the specified System.Guid from the data repository.
Declaration
public override ContentType Load(Guid guid)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Guid | guid | The ContentType GUID. | 
Returns
| Type | Description | 
|---|---|
| ContentType | The ContentType that matches the given System.Guid or null if none could be found. | 
Overrides
Load(Int32)
Loads a ContentType with the specified id from the data repository.
Declaration
public override ContentType Load(int id)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Int32 | id | The ContentType id. | 
Returns
| Type | Description | 
|---|---|
| ContentType | The ContentType that matches the given id or null if none could be found. | 
Overrides
Load(String)
Loads a ContentType with the specified name from the data repository.
Declaration
public override ContentType Load(string name)Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | name | The ContentType name. | 
Returns
| Type | Description | 
|---|---|
| ContentType | The ContentType that matches the given name or null if none could be found. | 
Overrides
Load(Type)
Loads a ContentType with the underlying System.Type from the data repository.
Declaration
public override ContentType Load(Type modelType)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Type | modelType | The underlying System.Type of the ContentType. | 
Returns
| Type | Description | 
|---|---|
| ContentType | The ContentType that matches the given System.Type or null if none could be found. | 
Overrides
Save(ContentType)
Saves the specified content type to the data repository.
Declaration
public override void Save(ContentType contentType)Parameters
| Type | Name | Description | 
|---|---|---|
| ContentType | contentType | The content type to save. | 
Overrides
Remarks
This member supports the EPiServer infrastructure and is not intended to be used directly from your code.
Exceptions
| Type | Condition | 
|---|---|
| System.NotSupportedException | 
 | 
Explicit Interface Implementations
ICachedRepository.ClearCache()
Clears all the cached data from the repository.
Declaration
void ICachedRepository.ClearCache()