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

Class DefaultOrderSearchAsyncService

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

Default implementation of IOrderSearchAsyncService.

Inheritance
System.Object
DefaultOrderSearchAsyncService
Namespace: EPiServer.Commerce.Order.Internal
Assembly: EPiServer.Business.Commerce.dll
Version: 14.26.0
Syntax
public class DefaultOrderSearchAsyncService : Object, IOrderSearchAsyncService

Constructors

DefaultOrderSearchAsyncService(ICartSearchService, IFeatureSwitch, OrderOptions)

Initialize new instance of DefaultOrderSearchService.

Declaration
public DefaultOrderSearchAsyncService(ICartSearchService cartSearch, IFeatureSwitch featureSwitch, OrderOptions orderOptions)
Parameters
Type Name Description
ICartSearchService cartSearch

The cart search service.

IFeatureSwitch featureSwitch

The feature switch.

OrderOptions orderOptions

The order options.

Methods

FilterAsync<TOrderGroup>(String, OrderSearchFilter, CancellationToken)

Declaration
public virtual Task<OrderFilterResult> FilterAsync<TOrderGroup>(string filterValue, OrderSearchFilter filter, CancellationToken cancellationToken)
    where TOrderGroup : class, IOrderGroup
Parameters
Type Name Description
System.String filterValue
OrderSearchFilter filter
System.Threading.CancellationToken cancellationToken
Returns
Type Description
System.Threading.Tasks.Task<OrderFilterResult>
Type Parameters
Name Description
TOrderGroup

SearchAsync<TOrderGroup>(String, OrderSearchFilter, CancellationToken)

Finds orders asynchronously by a set of parameters in OrderSearchFilter and CustomerEmail, CustomerName or CartId equal to or similar to searchValue for a specific TOrderGroup.

Declaration
public virtual Task<OrderSearchResults<TOrderGroup>> SearchAsync<TOrderGroup>(string searchValue, OrderSearchFilter filter, CancellationToken cancellationToken)
    where TOrderGroup : class, IOrderGroup
Parameters
Type Name Description
System.String searchValue

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

OrderSearchFilter filter

The search filter.

System.Threading.CancellationToken cancellationToken

The cancellation instruction.

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

A task of search result, contains a collection of order matching all criteria in the filter and CustomerEmail, CustomerName or TrackingNumber equal to or similar to searchValue.

Type Parameters
Name Description
TOrderGroup

The given order type for filter.

Implements