Example #1
0
        public ItemInstance Convert(ItemInstanceDto k)
        {
            ItemInstance item =
                k.Adapt <BoxInstance>() ??
                k.Adapt <SpecialistInstance>() ??
                k.Adapt <WearableInstance>() ??
                k.Adapt <UsableInstance>() ??
                k.Adapt <ItemInstance>();

            item.Item = _items.Find(s => s.VNum == k.ItemVNum);
            return(item);
        }
Example #2
0
        public ItemInstance Convert(ItemInstanceDto k)
        {
            ItemInstance item = k.Adapt <ItemInstance>();

            item.Item = _items.Find(s => s.VNum == k.ItemVNum);
            return(item);
        }
Example #3
0
        public void ItemInstanceDtoToItemInstanceEntity()
        {
            var itemInstanceDto    = new ItemInstanceDto();
            var itemInstanceEntity = itemInstanceDto.Adapt <ItemInstance>();

            Assert.IsNotNull(itemInstanceEntity);
        }