Exemplo n.º 1
0
        partial void Merge(Utility entity, ItemDTO dto, object state)
        {
            var consumableDto = dto.Consumable;
            if (consumableDto == null)
            {
                return;
            }

            entity.Effect = consumableDto.Description;
            double duration;
            if (double.TryParse(consumableDto.Duration, out duration))
            {
                entity.Duration = TimeSpan.FromMilliseconds(duration);
            }
        }
Exemplo n.º 2
0
        partial void Merge(Utility entity, ItemDTO dto, object state)
        {
            var details = dto.Details;
            if (details == null)
            {
                return;
            }

            var duration = details.Duration;
            if (duration.HasValue)
            {
                entity.Duration = TimeSpan.FromMilliseconds(duration.Value);
            }

            entity.Effect = details.Description;
        }