Class DiscountCollection
- Namespace
- Dynamicweb.Ecommerce.Orders.Discounts
- Assembly
- Dynamicweb.Ecommerce.dll
Represents information about a discount collection.
public class DiscountCollection : Collection<Discount>, IList<Discount>, ICollection<Discount>, IReadOnlyList<Discount>, IReadOnlyCollection<Discount>, IEnumerable<Discount>, IList, ICollection, IEnumerable
- Inheritance
-
Discount
Collection
- Implements
- Inherited Members
- Extension Methods
Constructors
DiscountCollection()
constructor
DiscountCollection(IEnumerable<Discount>)
Initializes a new instance of an OrderDiscountCollection with the provided discounts
Parameters
discounts
IEnumerable<Discount>OrderDiscount to be added to the list
DiscountCollection(IEnumerable<Discount>, SortBy, SortDirection)
Initializes a new instance of an OrderDiscountCollection with the provided discounts
public DiscountCollection(IEnumerable<Discount> discounts, SortBy currentSort, SortDirection currentSortDirection)
Parameters
discounts
IEnumerable<Discount>OrderDiscount to be added to the list
currentSort
SortBy Сurrent sort type in the collection. Used if collection already sorted by some criteria.
currentSortDirection
SortDirection Current sort direction of the collection.
Properties
Data
Gets the underlying data storage.
Property Value
Methods
GetRange(int, int)
Creates a shallow copy of a range of elements in the source OrderDiscountCollection.
Parameters
Returns
Sort()
Sort(SortBy)
Sorts elements according to the given field.
Parameters
sortByEnum
SortBy Field for sorting.
Sort(SortBy, SortDirection)
Sorts elements according to the given field and direction.
Parameters
sortByEnum
SortBy Field for sorting.
sortDirection
SortDirection Direction of sorting, ACS or DESC.
Sort(IComparer<Discount>)
Sorts elements according to the given comparer.
Parameters
Sort(Comparison<Discount>)
Sorts elements according to the given comparison.
Parameters
comparison
Comparison<Discount>Comparison.