Class PropertyMoneyList
A property type that is used as backing type when you want a list of Money objects.
Inheritance
Namespace: EPiServer.Commerce.SpecializedProperties
Assembly: EPiServer.Business.Commerce.dll
Version: 14.26.0Syntax
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<> 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.
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. |