private IDictionary <ItemKey, IEnumerable <Product> > ConvertItemsToProduct() { var itemListAccessor = new ItemListAccessor(); var itemsDictionary = itemListAccessor.GetItemDictionary(); var dictionaryProducts = new Dictionary <ItemKey, IEnumerable <Product> >(); foreach (KeyValuePair <ItemKey, IEnumerable <Item> > pair in itemsDictionary) { var listOfProducts = GetProductList(pair.Value); dictionaryProducts.Add(pair.Key, listOfProducts); } return(dictionaryProducts); }
public void CheckAllXmlFilesExist() { var accessor = new ItemListAccessor(); var fileLocation = accessor.GetFilePath() + accessor.GetFileName(); var isFileItemsListExist = File.Exists(fileLocation); if (!isFileItemsListExist) { throw new Exception($"File {fileLocation} not found"); } foreach (var chain in ChainsArchive) { var chainId = chain.ChainId; var chainXmlFileName = GetCahinXmlFileName(chainId); fileLocation = _xmlPath + chainXmlFileName; var isFileExist = File.Exists(fileLocation); if (!isFileExist) { throw new Exception($"File {fileLocation} not found"); } } }
public IEnumerable <ItemKey> GetItemsList() { var accessor = new ItemListAccessor(); return(accessor.GetItemDictionary().Select(x => x.Key).ToList()); }