Class DefaultLineItemValidator
Validates a ILine
Inheritance
Implements
Namespace: EPiServer.Commerce.Order
Assembly: EPiServer.Business.Commerce.dll
Version: 14.26.0Syntax
public class DefaultLineItemValidator : Object, ILineItemValidator
Constructors
DefaultLineItemValidator(IContentLoader, ReferenceConverter, ICatalogSystem, IPublishedStateAssessor)
Initializes a new instance of the Default
Declaration
public DefaultLineItemValidator(IContentLoader contentLoader, ReferenceConverter referenceConverter, ICatalogSystem catalogSystem, IPublishedStateAssessor publishedStateAssessor)
Parameters
Type | Name | Description |
---|---|---|
EPi |
contentLoader | The content loader. |
Reference |
referenceConverter | The reference converter. |
ICatalog |
catalogSystem | The catalog system. |
EPi |
publishedStateAssessor | The published state assessor. |
Methods
IsValidCatalog(EntryContentBase, DateTime)
Determines whether is valid catalog for the specified entry.
Declaration
protected virtual bool IsValidCatalog(EntryContentBase entry, DateTime requestDate)
Parameters
Type | Name | Description |
---|---|---|
Entry |
entry | The entry. |
System. |
requestDate | The request date. |
Returns
Type | Description |
---|---|
System. |
True if the catalog is valid. |
IsValidEntry(EntryContentBase)
Determines whether is valid entry for the specified entry.
Declaration
protected virtual bool IsValidEntry(EntryContentBase entry)
Parameters
Type | Name | Description |
---|---|---|
Entry |
entry | The entry. |
Returns
Type | Description |
---|---|
System. |
|
IsValidMarket(EntryContentBase, MarketId)
Determines whether is valid market for the specified content.
Declaration
protected virtual bool IsValidMarket(EntryContentBase content, MarketId marketId)
Parameters
Type | Name | Description |
---|---|---|
Entry |
content | The content. |
Market |
marketId | The market id. |
Returns
Type | Description |
---|---|
System. |
True if market is valid. |
Validate(ILineItem, MarketId, Action<ILineItem, ValidationIssue>)
Validates the specified line item.
Declaration
public virtual bool Validate(ILineItem lineItem, MarketId marketId, Action<ILineItem, ValidationIssue> onValidationError)
Parameters
Type | Name | Description |
---|---|---|
ILine |
lineItem | The line item. |
Market |
marketId | The market id. |
System. |
onValidationError | A callback that is invoked if a validation issue is detected. |
Returns
Type | Description |
---|---|
System. |
|