Exemplo n.º 1
0
 protected MemberMapper(MappingContainer container, MemberMapOptions options, MappingMember targetMember, ValueConverter converter)
 {
     _container   = container;
     _options     = options;
     TargetMember = targetMember;
     _converter   = converter;
 }
Exemplo n.º 2
0
        public static bool TryCreate(Type sourceType, Type targetType, MappingContainer container, out ValueConverter converter)
        {
            converter = null;
            Type sourceElementType, targetElementType;

            if (sourceType.IsEnumerable(out sourceElementType) && targetType.IsEnumerable(out targetElementType))
            {
                converter = new EnumerableValueConverter(container, sourceElementType, targetElementType);
                return(true);
            }
            return(false);
        }