Class MetaClassContentFactory
Creates CatalogContentBase instances based on a MetaClass.
Inheritance
Namespace: EPiServer.Commerce.Catalog.Provider.Construction
Assembly: EPiServer.Business.Commerce.dll
Version: 14.26.0Syntax
public class MetaClassContentFactory : ObjectConstructors
MetaClassContentFactory(MetaClassToContentTypeMap, MetaDataPropertyResolver, IContentFactory, IContentTypeRepository, CatalogLanguageLoader)
Initializes a new instance of the MetaClassContentFactory class.
Declaration
public MetaClassContentFactory(MetaClassToContentTypeMap metaClassMap, MetaDataPropertyResolver metaDataPropertyResolver, IContentFactory contentFactory, IContentTypeRepository contentTypeRepository, CatalogLanguageLoader languageLoader)Parameters
| Type | Name | Description | 
|---|---|---|
| MetaClassToContentTypeMap | metaClassMap | The meta class map. | 
| MetaDataPropertyResolver | metaDataPropertyResolver | The meta data property resolver. | 
| EPiServer.Construction.IContentFactory | contentFactory | The content factory. | 
| EPiServer.DataAbstraction.IContentTypeRepository | contentTypeRepository | The content type repository. | 
| CatalogLanguageLoader | languageLoader | The language loader. | 
MetaClassContentFactory(MetaClassToContentTypeMap, MetaDataPropertyResolver, IContentFactory, IContentTypeRepository, CatalogLanguageLoader, ExternalApplicationOptions, MetaDataOptions)
Initializes a new instance of the MetaClassContentFactory class.
Declaration
public MetaClassContentFactory(MetaClassToContentTypeMap metaClassMap, MetaDataPropertyResolver metaDataPropertyResolver, IContentFactory contentFactory, IContentTypeRepository contentTypeRepository, CatalogLanguageLoader languageLoader, ExternalApplicationOptions externalApplicationOptions, MetaDataOptions metaDataOptions)Parameters
| Type | Name | Description | 
|---|---|---|
| MetaClassToContentTypeMap | metaClassMap | The meta class map. | 
| MetaDataPropertyResolver | metaDataPropertyResolver | The meta data property resolver. | 
| EPiServer.Construction.IContentFactory | contentFactory | The content factory. | 
| EPiServer.DataAbstraction.IContentTypeRepository | contentTypeRepository | The content type repository. | 
| CatalogLanguageLoader | languageLoader | The language loader. | 
| EPiServer.Core.ExternalApplicationOptions | externalApplicationOptions | The external application options. | 
| MetaDataOptions | metaDataOptions | The meta data options | 
Methods
Create(String, Int32, String, Nullable<Int32>)
Creates a CatalogContentBase based on the specified metaClassId.
Declaration
public virtual CatalogContentBase Create(string baseEntryType, int metaClassId, string language, Nullable<int> catalogId)Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | baseEntryType | The base entry type, if any, used as fallback if no meta class matches. | 
| System.Int32 | metaClassId | The meta class id. | 
| System.String | language | The requested language, or null for master language. | 
| System.Nullable<System.Int32> | catalogId | The catalog id. | 
Returns
| Type | Description | 
|---|---|
| CatalogContentBase | A CatalogContentBase if any match is found; otherwise  | 
Create(String, String, Nullable<Int32>)
Creates a CatalogContentBase based on the specified content type name.
Declaration
protected virtual CatalogContentBase Create(string name, string language, Nullable<int> catalogId)Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | name | The name. | 
| System.String | language | The language. | 
| System.Nullable<System.Int32> | catalogId | The catalog id. | 
Returns
| Type | Description | 
|---|---|
| CatalogContentBase | 
Create(Type, String, Nullable<Int32>)
Creates a CatalogContentBase based on the specified type.
Declaration
protected virtual CatalogContentBase Create(Type type, string language, Nullable<int> catalogId)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Type | type | The type. | 
| System.String | language | The language. | 
| System.Nullable<System.Int32> | catalogId | The catalog id. | 
Returns
| Type | Description | 
|---|---|
| CatalogContentBase | 
Create<T>(String, Int32, Nullable<Int32>)
Creates an instance of type T and with properties from metafields.
Declaration
public virtual T Create<T>(string language, int metaClassId, Nullable<int> catalogId)
    where T : CatalogContentBaseParameters
| Type | Name | Description | 
|---|---|---|
| System.String | language | The requested language, or null for master language. | 
| System.Int32 | metaClassId | The meta class id. | 
| System.Nullable<System.Int32> | catalogId | The catalog id. | 
Returns
| Type | Description | 
|---|---|
| T | A CatalogContentBase of type  | 
Type Parameters
| Name | Description | 
|---|---|
| T | The type to create | 
Create<T>(String, Nullable<Int32>)
Creates an instance of type T.
Declaration
public virtual T Create<T>(string language, Nullable<int> catalogId)
    where T : CatalogContentBaseParameters
| Type | Name | Description | 
|---|---|---|
| System.String | language | The requested language, or null for master language. | 
| System.Nullable<System.Int32> | catalogId | The catalog id. | 
Returns
| Type | Description | 
|---|---|
| T | A CatalogContentBase of type  | 
Type Parameters
| Name | Description | 
|---|---|
| T | The type to create | 
