Class PromotionProcessorResolver
Finds the supported IPromotionProcessor type for a PromotionData, and returns an instance of that type.
Inheritance
Inherited Members
Namespace: EPiServer.Commerce.Marketing
Assembly: EPiServer.Business.Commerce.dll
Version: 13.30.0Syntax
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 |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | promotion model is null. |
| System.NotImplementedException | The |
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 |
|
Exceptions
| Type | Condition |
|---|---|
| System.InvalidOperationException | The type is not a promotion processor type. |
| System.ArgumentNullException | The promotion processor type is null. |