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
Implements
Namespace: EPiServer.Commerce.Order.Internal
Assembly: EPiServer.Business.Commerce.dll
Version: 14.26.0Syntax
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 |
Type Parameters
| Name | Description |
|---|---|
| TOrderGroup | The given order type for filter. |