Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more

Interface ICartSearchService

This interface is intended to be used internally by EPiServer. We do not support any backward compatibility on this.

Namespace: EPiServer.Commerce.Order.Internal
Assembly: Mediachase.Commerce.dll
Version: 14.26.0
Syntax
public interface ICartSearchService

Methods

FindCarts(OrderSearchFilter, out Int32)

Finds ICart by a set of parameters in filter.

Declaration
IEnumerable<ICart> FindCarts(OrderSearchFilter filter, out int totalRecords)
Parameters
Type Name Description
OrderSearchFilter filter

The filter options when finding cart.

System.Int32 totalRecords

The total records returned.

Returns
Type Description
System.Collections.Generic.IEnumerable<ICart>

A collection of ICart matching all criteria in the filter.

FindCarts(OrderSearchField, String, IEnumerable<String>, Int32, Int32, Boolean, out Int32)

Finds ICart by search field and search value.

Declaration
IEnumerable<ICart> FindCarts(OrderSearchField searchField, string searchValue, IEnumerable<string> excludedCartNames, int startIndex, int recordsToRetrieve, bool returnTotalCount, out int totalRecords)
Parameters
Type Name Description
OrderSearchField searchField

The search field use to search. For example: Email, CustomerName.

System.String searchValue

The search value.

System.Collections.Generic.IEnumerable<System.String> excludedCartNames

The cart names that will be excluded when finding carts.

System.Int32 startIndex

The starting index of record to retrieve.

System.Int32 recordsToRetrieve

The number of records to retrieve.

System.Boolean returnTotalCount

The flag to indicate if the search should return the total count of matched carts.

System.Int32 totalRecords

The total records returned.

Returns
Type Description
System.Collections.Generic.IEnumerable<ICart>

A collection of ICart.

FindCartsAsync(String, OrderSearchFilter, IEnumerable<String>, CancellationToken)

Finds ICart asynchronous by a set of parameters in filter and CustomerEmail, CustomerName or CartId equal to or similar to searchValue.

Declaration
Task<OrderSearchResults<ICart>> FindCartsAsync(string searchValue, OrderSearchFilter filter, IEnumerable<string> excludedCartNames, CancellationToken cancellationToken)
Parameters
Type Name Description
System.String searchValue

The search value use to search. For example: CustomerEmail, CustomerName or CartId.

OrderSearchFilter filter

The filter options when finding cart.

System.Collections.Generic.IEnumerable<System.String> excludedCartNames

The cart names that will be excluded when finding carts.

System.Threading.CancellationToken cancellationToken

The cancellation instruction.

Returns
Type Description
System.Threading.Tasks.Task<OrderSearchResults<ICart>>

A task of OrderSearchResults<T>. Contains a collection of ICart matching all criteria in the filter and CustomerEmail, CustomerName or CartId equal to or similar to searchValue.