Barcode Pick Async Mapper Product Provider

Defined in namespace Scandit.DataCapture.Barcode.Pick.Data

BarcodePickAsyncMapperProductProvider
class BarcodePickAsyncMapperProductProvider : IBarcodePickProductProvider

Added in version 6.26.0

Usage example:

List<BarcodePickProduct> products = new()
{
    new BarcodePickProduct("780846124122", 2),
    new BarcodePickProduct("750865926478", 1),
    new BarcodePickProduct("984579832123", 4),
};

IBarcodePickProductProvider provider = new BarcodePickAsyncMapperProductProvider(products, this);

...

public void ProductIdentifierForItems(IList<string> itemsData, BarcodePickProductProviderCallback callback)
{
    Task.Run(() =>
    {
        IList<BarcodePickProductProviderCallbackItem> result = myDb.FindAndMapProductsForItemsData(itemsData);
        callback.OnData(result);
    });
}

Note

Use your preferred way to retrieve the initial list of products to pick and to handle the async retrieval of products from itemsData. In this snippet we’re using a hardcoded set of products and a fictitious myDb object for simplicity’s sake.

BarcodePickAsyncMapperProductProvider()
BarcodePickAsyncMapperProductProvider(ICollection<BarcodePickProduct> productsToPick, IBarcodePickAsyncMapperProductProviderCallback @callback)

Added in version 6.26.0

Creates a new instance with the given set of BarcodePickProduct and callback to map items to products asynchronously.

UpdateProductList()
void UpdateProductList(ICollection<BarcodePickProduct> products)

Added in version 7.3.0

Replaces the products database to the newly provided list. This will reset scanning and all the previous picking progress will be lost.