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

Class PromotionProcessorResolver

Finds the supported IPromotionProcessor type for a PromotionData, and returns an instance of that type.

Inheritance
System.Object
PromotionProcessorResolver
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: 12.17.2
Syntax
public class PromotionProcessorResolver

Constructors

PromotionProcessorResolver(ITypeScannerLookup, IServiceLocator, TypeRelater)

Creates an instance of the PromotionProcessorResolver class.

Declaration
public PromotionProcessorResolver(ITypeScannerLookup typeScannerLookup, IServiceLocator serviceLocator, TypeRelater typeRelater)
Parameters
Type Name Description
EPiServer.Framework.TypeScanner.ITypeScannerLookup typeScannerLookup

The type scanner.

EPiServer.ServiceLocation.IServiceLocator serviceLocator

The Service locator.

EPiServer.Framework.TypeScanner.TypeRelater typeRelater

The type relater

Methods

GetPromotionProcessorTypesWithModelType()

List all registered IPromotionProcessor types with it's promotion data.

Declaration
protected IDictionary<Type, Type> GetPromotionProcessorTypesWithModelType()
Returns
Type Description
System.Collections.Generic.IDictionary<System.Type, System.Type>

A list of IPromotionProcessor types with it's promotion data

ResolveForPromotion(PromotionData)

Finds the supported IPromotionProcessor type for the PromotionData, and returns an instance of that type.

Declaration
public virtual IPromotionProcessor ResolveForPromotion(PromotionData promotionData)
Parameters
Type Name Description
PromotionData promotionData

The promotion model.

Returns
Type Description
IPromotionProcessor

Supported IPromotionProcessor if exist, otherwise null.

Exceptions
Type Condition
System.ArgumentNullException

promotion model is null.

System.NotImplementedException

The promotionData has no promotion processor.

ResolvePromotionProcessor(IList<Type>)

Gets a IPromotionProcessor instance for a type if the type implements IPromotionProcessor.

Declaration
public virtual IPromotionProcessor ResolvePromotionProcessor(IList<Type> promotionProcessorTypes)
Parameters
Type Name Description
System.Collections.Generic.IList<System.Type> promotionProcessorTypes

The collection of IPromotionProcessor types.

Returns
Type Description
IPromotionProcessor

IPromotionProcessor if the type is a promotion processor type.

Exceptions
Type Condition
System.InvalidOperationException

The type is not a promotion processor type.

System.ArgumentNullException

The promotion processor type is null.