Exemplo n.º 1
0
        public override object Map(object source)
        {
            if (source == null)
            {
                return(null);
            }
            var target = TypeMeta.New(TargetType.Type);

            foreach (var propertyMap in _propertyMaps)
            {
                try
                {
                    propertyMap.Map(source, target);
                }
                catch (Exception ex)
                {
                    throw new MappingException(string.Format("Could not map property {0}", propertyMap.FullName), ex);
                }
            }
            return(target);
        }