Class PromotionDataValidatorBase<TPromotionData>

Validates rewards for the PromotionData promotion.

Implements
EPiServer.Validation.IValidate<TPromotionData>
EPiServer.Validation.IValidate
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.Validation
Assembly: EPiServer.Business.Commerce.dll
Version: 10.8.0
Syntax
[CLSCompliant(false)]
public abstract class PromotionDataValidatorBase<TPromotionData> : IValidate<TPromotionData>, IValidate where TPromotionData : PromotionData
Type Parameters
Name Description
TPromotionData

Constructors

PromotionDataValidatorBase(LocalizationService)

Initializes a new instance of the PromotionDataValidatorBase class.

Declaration
public PromotionDataValidatorBase(LocalizationService localizationService)
Parameters
Type Name Description
EPiServer.Framework.Localization.LocalizationService localizationService

The localization service.

Properties

LocalizationService

Gets localization service.

Declaration
protected LocalizationService LocalizationService { get; }
Property Value
Type Description
EPiServer.Framework.Localization.LocalizationService

Methods

AddErrorsIfNeeded(TPromotionData, List<ValidationError>)

Validates the specified promotion.

Declaration
protected abstract void AddErrorsIfNeeded(TPromotionData promotion, List<ValidationError> validationErrors)
Parameters
Type Name Description
TPromotionData promotion

The promotion that will be validated.

System.Collections.Generic.List<EPiServer.Validation.ValidationError> validationErrors

The validation errors that will be returned.

Validate(TPromotionData)

Validates the specified promotion.

Declaration
public IEnumerable<ValidationError> Validate(TPromotionData promotion)
Parameters
Type Name Description
TPromotionData promotion

The promotion that will be validated.

Returns
Type Description
System.Collections.Generic.IEnumerable<EPiServer.Validation.ValidationError>

Validation errors for any empty required property.

Implements

EPiServer.Validation.IValidate<>
EPiServer.Validation.IValidate