November Happy Hour will be moved to Thursday December 5th.

Class MetaDataPropertyMapper

This type/member supports the EPiServer infrastructure and is not intended to be used directly from your code.

Maps between meta data types and property data types.

Inheritance
System.Object
MetaDataPropertyMapper
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Commerce.Catalog.Provider
Assembly: EPiServer.Business.Commerce.dll
Version: 13.30.0
Syntax
public class MetaDataPropertyMapper

Constructors

MetaDataPropertyMapper()

Initializes a new instance of the MetaDataPropertyMapper class.

Declaration
public MetaDataPropertyMapper()

MetaDataPropertyMapper(IObjectSerializerFactory, IPermanentLinkMapper)

Initializes a new instance of the MetaDataPropertyMapper class.

Declaration
[Obsolete("This constructor is no longer used. Using the one without IObjectSerializerFactory instead. Will remain at least until March 2020")]
public MetaDataPropertyMapper(IObjectSerializerFactory objectSerializerFactory, IPermanentLinkMapper linkMapper)
Parameters
Type Name Description
EPiServer.Framework.Serialization.IObjectSerializerFactory objectSerializerFactory

The object serializer factory.

EPiServer.Web.IPermanentLinkMapper linkMapper

The link mapper.

MetaDataPropertyMapper(IPermanentLinkMapper)

Initializes a new instance of the MetaDataPropertyMapper class.

Declaration
public MetaDataPropertyMapper(IPermanentLinkMapper linkMapper)
Parameters
Type Name Description
EPiServer.Web.IPermanentLinkMapper linkMapper

The link mapper.

Methods

AssignMetaFieldValueToProperty(PropertyData, Object, MetaDataType, String)

Assigns the meta field value to the property.

Declaration
public virtual void AssignMetaFieldValueToProperty(PropertyData property, object metaFieldValue, MetaDataType metaDataType, string blockPropertyMetaFieldName)
Parameters
Type Name Description
EPiServer.Core.PropertyData property

The property.

System.Object metaFieldValue

The meta field value.

MetaDataType metaDataType

The type of the meta field.

System.String blockPropertyMetaFieldName

The name of the meta field, only needed when working with block properties.

GetPropertyDataType(MetaDataType)

Gets the property data type corresponding to a meta data type.

Declaration
public virtual Type GetPropertyDataType(MetaDataType metaDataType)
Parameters
Type Name Description
MetaDataType metaDataType

The meta data type.

Returns
Type Description
System.Type

The corresponding property data type, or null if none can be found.

SetDefaultValue(MetaField, MetaObject)

Sets a valid default value for a required meta field that is not set.

Declaration
public virtual void SetDefaultValue(MetaField metaField, MetaObject metaObj)
Parameters
Type Name Description
MetaField metaField

The meta field.

MetaObject metaObj

The meta object to set the value in.

SetMetaObjectValueFromProperty(PropertyData, MetaField, MetaObject)

Sets a property value to a meta field.

Declaration
public virtual void SetMetaObjectValueFromProperty(PropertyData property, MetaField metaField, MetaObject metaObj)
Parameters
Type Name Description
EPiServer.Core.PropertyData property

The property to get the value from.

MetaField metaField

The meta field corresponding to the property.

MetaObject metaObj

The meta object.