Class ContentTypeModelRepository
A Repository for Content
Inheritance
Namespace: EPiServer.DataAbstraction
Assembly: EPiServer.dll
Version: 12.0.3Syntax
[ServiceConfiguration]
public class ContentTypeModelRepository : Object
Constructors
ContentTypeModelRepository()
Declaration
public ContentTypeModelRepository()
Methods
GetContentTypeModel(Type)
Gets the content type model that corresponds to a model type that is defined on Model
Declaration
public virtual ContentTypeModel GetContentTypeModel(Type modelType)
Parameters
Type | Name | Description |
---|---|---|
System. |
modelType | Type of the model. |
Returns
Type | Description |
---|---|
Content |
GetPropertyModel(Int32, PropertyDefinition)
Gets the property model that corresponds to a Property
Declaration
public virtual PropertyDefinitionModel GetPropertyModel(int contentTypeId, PropertyDefinition propertyDefinition)
Parameters
Type | Name | Description |
---|---|---|
System. |
contentTypeId | The content type id. |
Property |
propertyDefinition | The property definition. |
Returns
Type | Description |
---|---|
Property |
List()
Lists all registered Content
Declaration
public virtual IEnumerable<ContentTypeModel> List()
Returns
Type | Description |
---|---|
System. |
OnModelChanged(ContentType)
Method to raise Model
Declaration
protected virtual void OnModelChanged(ContentType contentType)
Parameters
Type | Name | Description |
---|---|---|
Content |
contentType | Type of the content. |
Register(Type, ContentTypeModel)
Registers model
that corresponds to modelType
.
Declaration
public virtual void Register(Type modelType, ContentTypeModel model)
Parameters
Type | Name | Description |
---|---|---|
System. |
modelType | Type of the model. |
Content |
model | The model. |
RegisterContentType(ContentType)
Registers the Model
Declaration
public virtual void RegisterContentType(ContentType contentType)
Parameters
Type | Name | Description |
---|---|---|
Content |
contentType | Type of the content. |
Events
ModelChanged
Occurs when the repository has a change in a model instance.
Declaration
public event EventHandler<ModelRepositoryEventArgs> ModelChanged
Event Type
Type | Description |
---|---|
System. |