Beispiel #1
0
        internal void ValidateType(Type targetType)
        {
            var config = _configFactory.Create(targetType);
            var rules  = _classLevelRuleFactory.CreateRules(config);
            var toType = targetType.BaseType.GetGenericArguments()[1].UnderlyingSystemType;

            rules.ToList().ForEach(a => a.Run(config, targetType, toType));
        }
Beispiel #2
0
 private static IClassMapper CreateClassMapper <TSource>(TSource source, ClassMappingConfiguration config)
 {
     return(new ClassMapper(
                _classLevelRuleFactory.CreateRules(config),
                _getProps,
                new CopyStrategyFactory(),
                new PropertyMappingStrategyFactory()));
 }