Beispiel #1
0
        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);
        }
Beispiel #2
0
        public IEnumerable <ItemKey> GetItemsList()
        {
            var accessor = new ItemListAccessor();

            return(accessor.GetItemDictionary().Select(x => x.Key).ToList());
        }