Class DefaultContentTypeRepository
Inherited Members
Namespace: EPiServer.DataAbstraction.Internal
Assembly: EPiServer.dll
Version: 12.0.3Syntax
public class DefaultContentTypeRepository : ContentTypeRepository, IContentTypeRepository, IContentTypeRepository<ContentType>, ICachedRepositoryConstructors
DefaultContentTypeRepository(ContentTypeModelRepository, ContentTypeDB, ModelMerger, ITabDefinitionRepository, IPropertyDefinitionTypeRepository, IPropertyDefinitionTypeEvents, ITypeReferenceAnalyzer, IPropertyDefinitionRepository, ISynchronizedObjectInstanceCache, IContentTypeBaseResolver, IContentTypeVersionEvaluator, IContentTypeComparer)
Initializes a new instance of the DefaultContentTypeRepository class.
Declaration
public DefaultContentTypeRepository(ContentTypeModelRepository modelRepository, ContentTypeDB contentTypeDataAccess, ModelMerger modelMerger, ITabDefinitionRepository tabDefinitionRepository, IPropertyDefinitionTypeRepository propertyDefinitionTypeRepository, IPropertyDefinitionTypeEvents propertyDefinitionTypeEvents, ITypeReferenceAnalyzer circularReferenceValidator, IPropertyDefinitionRepository propertyDefinitionRepository, ISynchronizedObjectInstanceCache cacheInstance, IContentTypeBaseResolver contentTypeBaseResolver, IContentTypeVersionEvaluator contentTypeVersionEvaluator, IContentTypeComparer contentTypeComparer)Parameters
| Type | Name | Description | 
|---|---|---|
| ContentTypeModelRepository | modelRepository | |
| ContentTypeDB | contentTypeDataAccess | |
| ModelMerger | modelMerger | |
| ITabDefinitionRepository | tabDefinitionRepository | |
| IPropertyDefinitionTypeRepository | propertyDefinitionTypeRepository | |
| IPropertyDefinitionTypeEvents | propertyDefinitionTypeEvents | |
| ITypeReferenceAnalyzer | circularReferenceValidator | |
| IPropertyDefinitionRepository | propertyDefinitionRepository | |
| ISynchronizedObjectInstanceCache | cacheInstance | |
| IContentTypeBaseResolver | contentTypeBaseResolver | |
| IContentTypeVersionEvaluator | contentTypeVersionEvaluator | |
| IContentTypeComparer | contentTypeComparer | 
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 | 
 | 
Save(IEnumerable<ContentType>, ContentTypeSaveOptions)
Save list of ContentType with respect to ContentTypeSaveOptions
Declaration
public override void Save(IEnumerable<ContentType> contentTypes, ContentTypeSaveOptions options)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Collections.Generic.IEnumerable<ContentType> | contentTypes | The content types. | 
| ContentTypeSaveOptions | options | The content type save options. | 
Overrides
Exceptions
| Type | Condition | 
|---|---|
| VersionValidationException | Throws the exception when version transition is not valid. | 
Explicit Interface Implementations
ICachedRepository.ClearCache()
Clears all the cached data from the repository.
Declaration
void ICachedRepository.ClearCache()