Пример #1
0
        /// <inheritdoc />
        public Unlocker Convert(ItemDTO value, object state)
        {
            var entity = new CraftingRecipeUnlocker();

            this.Merge(entity, value, state);
            return(entity);
        }
        partial void Merge(CraftingRecipeUnlocker entity, ItemDTO dto, object state)
        {
            var details = dto.Details;

            if (details == null)
            {
                return;
            }

            if (details.RecipeId.HasValue)
            {
                entity.RecipeId = details.RecipeId.Value;
            }
        }
        partial void Merge(CraftingRecipeUnlocker entity, ItemDTO dto, object state)
        {
            var consumableDto = dto.Consumable;

            if (consumableDto == null)
            {
                return;
            }

            int recipeId;

            if (int.TryParse(consumableDto.RecipeId, out recipeId))
            {
                entity.RecipeId = recipeId;
            }
        }
Пример #4
0
 // Implement this method in a buddy class to set properties that are specific to 'CraftingRecipeUnlocker' (if any)
 partial void Merge(CraftingRecipeUnlocker entity, ItemDTO dto, object state);