コード例 #1
0
        public void TestGetSets()
        {
            var sets = _service.DownloadItems("S");

            Assert.IsNotNull(sets);
            Assert.AreNotEqual(0, sets.Count);

            var avengersTower = sets.SingleOrDefault(x => x.ItemId == "76038-1");

            Assert.IsNotNull(avengersTower);
            Assert.AreEqual("Attack on Avengers Tower", avengersTower.Name);
        }
コード例 #2
0
ファイル: ItemService.cs プロジェクト: ldh2002/Brickficiency2
        protected override List <ItemDetails> GetItemsFromSource()
        {
            var itemTypes      = _itemTypeService.GetItemTypes();
            var bricklinkItems = new List <BricklinkItem>();

            foreach (var itemType in itemTypes.Where(x => x.ItemTypeCode != "U"))
            {
                var toAdd = _bricklinkCatalogService.DownloadItems(itemType.ItemTypeCode);
                bricklinkItems.AddRange(toAdd);
            }

            var converted = bricklinkItems.Select(x => ConvertItem(x)).ToList();

            return(converted);
        }