SaaS CMS has officially launched! Learn more now.

Class ModelMerger

Handles merging of values defined on models/code for PropertyDefinition and ContentType.

Inheritance
System.Object
ModelMerger
Namespace: EPiServer.DataAbstraction.RuntimeModel.Internal
Assembly: EPiServer.dll
Version: 12.0.3
Syntax
[ServiceConfiguration]
public class ModelMerger : Object

Constructors

ModelMerger(IContentModelUsage, ContentModelOptions)

Initializes a new instance of the ModelMerger class.

Declaration
public ModelMerger(IContentModelUsage contentModelUsage, ContentModelOptions options)
Parameters
Type Name Description
IContentModelUsage contentModelUsage
ContentModelOptions options

Methods

MergeModelSettings(ContentType, ContentTypeModel)

Merges the model settings from model into the version of contentType.

Declaration
public virtual void MergeModelSettings(ContentType contentType, ContentTypeModel model)
Parameters
Type Name Description
ContentType contentType

Type of the content.

ContentTypeModel model

The model.

Remarks

Only seetings on contentType that does not have a value will have it's value merged from model.

MergePropertySettings(PropertyDefinition, PropertyDefinitionModel, ITabDefinitionRepository)

Merges the model settings from model into the version of propertyDefinition.

Declaration
public virtual void MergePropertySettings(PropertyDefinition propertyDefinition, PropertyDefinitionModel model, ITabDefinitionRepository tabDefinitionRepository)
Parameters
Type Name Description
PropertyDefinition propertyDefinition

The property definition.

PropertyDefinitionModel model

The model.

ITabDefinitionRepository tabDefinitionRepository

The tab definition repository.

Remarks

Only settings on propertyDefinition that does not have a value will have it's value merged from model.

RemoveModelSettings(ContentType, ContentTypeModel)

Removes all values from contentType that have values that corresponds with values on model.

Declaration
public virtual void RemoveModelSettings(ContentType contentType, ContentTypeModel model)
Parameters
Type Name Description
ContentType contentType

Type of the content.

ContentTypeModel model

The model.

RemovePropertyModelSettings(PropertyDefinition, PropertyDefinitionModel)

Removes all values from propertyDefinition that have values that corresponds with values on model.

Declaration
public virtual void RemovePropertyModelSettings(PropertyDefinition propertyDefinition, PropertyDefinitionModel model)
Parameters
Type Name Description
PropertyDefinition propertyDefinition

The property definition.

PropertyDefinitionModel model

The model.

Extension Methods