Class CollectionTargetEvaluator

Used by the promotion processors to identify which of the ILineItem that are included in the target property (that is exposed as an System.Collections.Generic.IEnumerable<T>).

Inheritance
System.Object
CollectionTargetEvaluator
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Commerce.Marketing
Assembly: EPiServer.Business.Commerce.dll
Version: 10.8.0
Syntax
public class CollectionTargetEvaluator

Constructors

CollectionTargetEvaluator(IContentLoader, IRelationRepository, ReferenceConverter)

Creates an instance of CollectionTargetEvaluator.

Declaration
public CollectionTargetEvaluator(IContentLoader contentLoader, IRelationRepository relationRepository, ReferenceConverter referenceConverter)
Parameters
Type Name Description
EPiServer.IContentLoader contentLoader

The content loader service.

IRelationRepository relationRepository

The relation repository service.

ReferenceConverter referenceConverter

The reference converter service.

Methods

GetApplicableCodes(IEnumerable<ILineItem>, IEnumerable<ContentReference>, Boolean)

Gets all applicable Codes in the order by the targets in the promotion

Declaration
public virtual IList<string> GetApplicableCodes(IEnumerable<ILineItem> lineItemsInOrder, IEnumerable<ContentReference> targets, bool matchRecursive)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<ILineItem> lineItemsInOrder

The line items in the order

System.Collections.Generic.IEnumerable<EPiServer.Core.ContentReference> targets

The target items for which the promotion is valid.

System.Boolean matchRecursive

Determines if a recursive logic should be used when identifying if an item is applicable for this promotion.

Returns
Type Description
System.Collections.Generic.IList<System.String>

One Code for each ILineItem in lineItemsInOrder that matches any promotion target.