public string GetCategoryByItem(IItemInfo item) { string category = "Unclassified"; ItemRecognizeData recognizerData = null; foreach (KeyValuePair <IItemInfo, ItemRecognizeData> keyValue in mItemToRecognizerTypeDictionary) { if (keyValue.Key.Barcode == item.Barcode) { recognizerData = keyValue.Value; } } if (recognizerData != null) { category = recognizerData.Category; } return(category); }
public string GetRecognizerTypeByItem(IItemInfo item) { string recognizerType = "UnkownRecognizer"; ItemRecognizeData recognizerData = null; foreach (KeyValuePair <IItemInfo, ItemRecognizeData> keyValue in mItemToRecognizerTypeDictionary) { if (keyValue.Key.Barcode == item.Barcode) { recognizerData = keyValue.Value; } } if (recognizerData != null) { recognizerType = recognizerData.RecognizerType; } return(recognizerType); }