Class MetaClassToContentTypeMap

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

Contains mappings between content type models and meta classes.

Inheritance
System.Object
MetaClassToContentTypeMap
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: 10.8.0
Syntax
public class MetaClassToContentTypeMap

Constructors

MetaClassToContentTypeMap(ContentTypeModelRepository)

Initializes a new instance of the MetaClassToContentTypeMap class.

Declaration
public MetaClassToContentTypeMap(ContentTypeModelRepository contentTypeModelRepository)
Parameters
Type Name Description
EPiServer.DataAbstraction.ContentTypeModelRepository contentTypeModelRepository

Service to work with content type models.

Methods

GetContentTypeModel(Int32)

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

Gets the content type model.

Declaration
public virtual Type GetContentTypeModel(int metaClassId)
Parameters
Type Name Description
System.Int32 metaClassId

The meta class id.

Returns
Type Description
System.Type

GetContentTypeModel(String)

Gets the content type model from the name (according to EntryType).

Declaration
public virtual Type GetContentTypeModel(string baseEntryType)
Parameters
Type Name Description
System.String baseEntryType

Type of the base entry.

Returns
Type Description
System.Type

GetMetaClassId(Type)

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

Declaration
public virtual int GetMetaClassId(Type modelType)
Parameters
Type Name Description
System.Type modelType

Type of the model.

Returns
Type Description
System.Int32

The id of the meta class if found, otherwise 0.

GetMetaClassName(Type)

This type/member supports the EPiServer infrastructure and is not intended to be used directly from your code. Gets the name of the meta class from the a registered model type.

Declaration
public virtual string GetMetaClassName(Type modelType)
Parameters
Type Name Description
System.Type modelType

Type of the model.

Returns
Type Description
System.String

The meta class name from the CatalogContentTypeAttribute of the type registered in the EPiServer.DataAbstraction.ContentTypeRepository, or null if it is not registered or lacks the attribute.

ThrowIfNotUnique(Dictionary<Type, String>, String)

Throws an exception if the same meta class name is used on several content types.

Declaration
protected virtual void ThrowIfNotUnique(Dictionary<Type, string> mappings, string metaClassName)
Parameters
Type Name Description
System.Collections.Generic.Dictionary<System.Type, System.String> mappings

The existing mappings.

System.String metaClassName

The name to check.