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

Class PropertyMoneyList

A property type that is used as backing type when you want a list of Money objects.

Inheritance
System.Object
PropertyMoneyList
Namespace: EPiServer.Commerce.SpecializedProperties
Assembly: EPiServer.Business.Commerce.dll
Version: 12.17.2
Syntax
public class PropertyMoneyList : PropertyList<Money>
Remarks

This property type should only be used on content types inheriting from PromotionData. When a promotion using this property type is created and edited using the EPiServer UI the values for this property will be pre-populated with Money objects matching the parent SalesCampaign TargetMarket currencies.

Content type models that define an System.Collections.Generic.IList<T> property will get this property type.

Constructors

PropertyMoneyList()

Initializes a new instance of the PropertyMoneyList class.

Declaration
public PropertyMoneyList()

PropertyMoneyList(IEnumerable<Money>)

Initializes a new instance of the PropertyMoneyList class with the provided list.

Declaration
public PropertyMoneyList(IEnumerable<Money> list)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<Money> list

Methods

ParseItem(String)

Parses the string to a Money object.

Declaration
protected override Money ParseItem(string value)
Parameters
Type Name Description
System.String value

The value.

Returns
Type Description
Money

A money object.

Remarks

The string is expected to be of the format "USD;99.99". First the currency ISO code followed by a semicolon and then the amount formatted using System.Globalization.CultureInfo.InvariantCulture.

ParseToObject(String)

Creates a new instance of EPiServer.Core.PropertyData with the given value, ie reversed ToString().

Declaration
[Obsolete("ParseToObject is no longer required by the CMS. The same functionality can be achieved by creating a new instance and calling the ParseToSelf method.")]
public override PropertyData ParseToObject(string value)
Parameters
Type Name Description
System.String value

The string value to parse.

Returns
Type Description
EPiServer.Core.PropertyData

A new instance of EPiServer.Core.PropertyData with the given value.

Remarks

The value should be comma separated list using the the format for each value as specified on ParseItem(String) method.

ToString()

Returns a System.String that represents this instance.

Declaration
public override string ToString()
Returns
Type Description
System.String

A System.String that represents this instance.