Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Class PromotionTypeHandler

Provides the capability to show or hide specific promotion types that inherit from PromotionData.

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

Constructors

PromotionTypeHandler(IContentTypeRepository, ITypeScannerLookup)

Creates an instance of PromotionTypeHandler.

Declaration
public PromotionTypeHandler(IContentTypeRepository contentTypeRepository, ITypeScannerLookup typeScannerLookup)
Parameters
Type Name Description
EPiServer.DataAbstraction.IContentTypeRepository contentTypeRepository

The content type repository.

EPiServer.Framework.TypeScanner.ITypeScannerLookup typeScannerLookup

The type scanner lookup.

Methods

DisableBuiltinPromotions()

Disables all built-in promotion types that inherit from PromotionData.

Declaration
public void DisableBuiltinPromotions()

DisablePromotions(IEnumerable<Type>)

Disables specific promotions which inherit from PromotionData.

Declaration
public void DisablePromotions(IEnumerable<Type> promotionTypes)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<System.Type> promotionTypes

The collection of promotion types that need to be disabled.

Remarks

The promotion types must inherit from PromotionData.

EnablePromotions(IEnumerable<Type>)

Enables specific promotions which inherit from PromotionData.

Declaration
public void EnablePromotions(IEnumerable<Type> promotionTypes)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<System.Type> promotionTypes

The collection of promotion types that need to be enabled.

Remarks

The promotion types must inherit from PromotionData.

GetAllPromotionTypes()

Gets all promotion types that inherit from PromotionData.

Declaration
public IEnumerable<Type> GetAllPromotionTypes()
Returns
Type Description
System.Collections.Generic.IEnumerable<System.Type>

The collection of promotion types.

Remarks

The abstract types are not included.