Class PriceCollection
- Namespace
- Dynamicweb.Ecommerce.Prices
- Assembly
- Dynamicweb.Ecommerce.dll
Represents a collection of the Price.
[Serializable]
public class PriceCollection : ReadOnlyCollection<Price>, IList<Price>, ICollection<Price>, IReadOnlyList<Price>, IReadOnlyCollection<Price>, IEnumerable<Price>, IList, ICollection, IEnumerable
- Inheritance
-
PriceCollection
- Implements
- Inherited Members
- Extension Methods
Constructors
PriceCollection(List<Price>)
public PriceCollection(List<Price> prices)
Parameters
Properties
this[int]
Gets or sets the element at the specified index.
public Price this[int index] { get; }
Parameters
index
int
Property Value
- Price
- The element at the specified index.
Methods
IndexOf(double, string)
Locates the Price than has matching Quantity and CurrencyCode and return the collection index of the matching Price object.
public int IndexOf(double quantity, string currencyCode)
Parameters
Returns
- int
- Returns index of matching Quantity and CurrencyCode, if not found the function return -1
Load(string)
Loads the specified prices.
[Obsolete("Deprecated and replaced by Price.GetPricesBySql", true)]
public void Load(string sql)
Parameters
sql
string- The SQL query.