Class ObjectHelper
Implements helper methods for catalog managers.
Inheritance
Namespace: Mediachase.Commerce.Catalog.Managers
Assembly: Mediachase.Commerce.dll
Version: 14.26.0Syntax
public static class ObjectHelper : ObjectMethods
CreateAttribute(String, String, String, String[])
Creates ItemAttribute element.
Declaration
public static ItemAttribute CreateAttribute(string name, string friendlyname, string type, string[] val)Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | name | Name field value for ItemAttribute. | 
| System.String | friendlyname | FriendlyName field value for ItemAttribute. | 
| System.String | type | Type field value for ItemAttribute. | 
| System.String[] | val | Value field value for ItemAttribute. | 
Returns
| Type | Description | 
|---|---|
| ItemAttribute | Returns new ItemAttribute element. | 
CreateAttribute(String, String, Type, Object)
Creates the attribute.
Declaration
public static ItemAttribute CreateAttribute(string name, string friendlyname, Type type, object val)Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | name | The name. | 
| System.String | friendlyname | The friendlyname. | 
| System.Type | type | The type. | 
| System.Object | val | The val. | 
Returns
| Type | Description | 
|---|---|
| ItemAttribute | 
CreateAttributes(ItemAttributes, DataRow)
Creates the attributes.
Declaration
public static void CreateAttributes(ItemAttributes metaAttributes, DataRow row)Parameters
| Type | Name | Description | 
|---|---|---|
| ItemAttributes | metaAttributes | The meta attributes. | 
| System.Data.DataRow | row | The row. | 
CreateFile(String, String, String[])
Creates ItemFile element.
Declaration
public static ItemFile CreateFile(string name, string type, string[] val)Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | name | Name field value for ItemFile. | 
| System.String | type | Type field value for ItemFile. | 
| System.String[] | val | Value field value for ItemFile. | 
Returns
| Type | Description | 
|---|---|
| ItemFile | Returns new ItemFile element. | 
CreateImage(String, String)
Creates Image element.
Declaration
public static Image CreateImage(string name, string url)Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | name | Name field value for Image. | 
| System.String | url | URL field value for Image. | 
Returns
| Type | Description | 
|---|---|
| Image | Returns new Image element. | 
CreatePrice(Money)
Creates the price.
Declaration
public static Price CreatePrice(Money money)Parameters
| Type | Name | Description | 
|---|---|---|
| Money | money | The amount. | 
Returns
| Type | Description | 
|---|---|
| Price | 
CreateUnitsAttribute(String, String)
Creates NonNegativeIntegerWithUnits element.
Declaration
public static NonNegativeIntegerWithUnits CreateUnitsAttribute(string units, string val)Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | units | Name field value for ArgumentsArgument. | 
| System.String | val | Value field value for ArgumentsArgument. | 
Returns
| Type | Description | 
|---|---|
| NonNegativeIntegerWithUnits | Returns new NonNegativeIntegerWithUnits element. | 
GetMetaFieldValues(DataRow)
Gets the meta field values.
Declaration
public static Hashtable GetMetaFieldValues(DataRow row)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Data.DataRow | row | The row. | 
Returns
| Type | Description | 
|---|---|
| System.Collections.Hashtable | 
GetMetaFieldValues(DataRow, MetaClass, ref ItemAttributes)
Gets the meta field values.
Declaration
public static Hashtable GetMetaFieldValues(DataRow row, MetaClass metaClass, ref ItemAttributes metaAttributes)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Data.DataRow | row | The row. | 
| MetaClass | metaClass | The meta class. | 
| ItemAttributes | metaAttributes | The meta attributes. | 
Returns
| Type | Description | 
|---|---|
| System.Collections.Hashtable | 
GetMetaFieldValues(DataRow, MetaClass, ref ItemAttributes, MetaDataContext)
Gets the meta field values.
Declaration
public static Hashtable GetMetaFieldValues(DataRow row, MetaClass metaClass, ref ItemAttributes metaAttributes, MetaDataContext context)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Data.DataRow | row | The row. | 
| MetaClass | metaClass | The meta class. | 
| ItemAttributes | metaAttributes | The meta attributes. | 
| MetaDataContext | context | The meta data context to access the database with. | 
Returns
| Type | Description | 
|---|---|
| System.Collections.Hashtable | 
