Class ModelMerger
Handles merging of values defined on models/code for Property
Inheritance
Namespace: EPiServer.DataAbstraction.RuntimeModel.Internal
Assembly: EPiServer.dll
Version: 12.0.3Syntax
[ServiceConfiguration]
public class ModelMerger : Object
Constructors
ModelMerger(IContentModelUsage, ContentModelOptions)
Initializes a new instance of the Model
Declaration
public ModelMerger(IContentModelUsage contentModelUsage, ContentModelOptions options)
Parameters
Type | Name | Description |
---|---|---|
IContent |
contentModelUsage | |
Content |
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 |
---|---|---|
Content |
contentType | Type of the content. |
Content |
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 |
---|---|---|
Property |
propertyDefinition | The property definition. |
Property |
model | The model. |
ITab |
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 |
---|---|---|
Content |
contentType | Type of the content. |
Content |
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 |
---|---|---|
Property |
propertyDefinition | The property definition. |
Property |
model | The model. |