Class ContentDataAttributeScanningAssigner
Scans attributes on a ContentData type, and it's properties to assign values to an ContentTypeModel instence, and it's properties.
Inheritance
Implements
Inherited Members
Namespace: EPiServer.DataAbstraction.RuntimeModel
Assembly: EPiServer.dll
Version: 9.12.2Syntax
[ServiceConfiguration(typeof(IContentTypeModelAssigner))]
public class ContentDataAttributeScanningAssigner : IContentTypeModelAssigner
Examples
The following code example demonstrate how to use ContentDataAttributeScanningAssigner to Assign valued from attributes.
Constructors
ContentDataAttributeScanningAssigner()
Declaration
public ContentDataAttributeScanningAssigner()
Methods
AssignValues(ContentTypeModel)
Assigns values to contentTypeModel
from attributes defined on ModelType
Declaration
public virtual void AssignValues(ContentTypeModel contentTypeModel)
Parameters
Type | Name | Description |
---|---|---|
ContentTypeModel | contentTypeModel | The content type model, which will be populated with values. |
Examples
The following code example demonstrate how to use ContentDataAttributeScanningAssigner to Assign valued from attributes.
AssignValuesToPropertyDefinition(PropertyDefinitionModel, PropertyInfo, ContentTypeModel)
Assigns values to propertyDefinitionModel
from attributes defined on property
Declaration
public virtual void AssignValuesToPropertyDefinition(PropertyDefinitionModel propertyDefinitionModel, PropertyInfo property, ContentTypeModel parentModel)
Parameters
Type | Name | Description |
---|---|---|
PropertyDefinitionModel | propertyDefinitionModel | The property definition model, which will be populated with values. |
System.Reflection.PropertyInfo | property | The property to use when scanning for attributes. |
ContentTypeModel | parentModel | The content type model, in which the property contains. |
Examples
The following code example demonstrate how to use ContentDataAttributeScanningAssigner to Assign valued from attributes.