Beispiel #1
0
        private static void FindAndAutoMapTypes(IMapperConfigurationExpression configuration)
        {
            var types = TypeFindExtensions.Find(type =>
            {
                var typeInfo = type.GetTypeInfo();
                return(typeInfo.IsDefined(typeof(AutoMapAttribute)));
            }
                                                );

            foreach (var type in types)
            {
                configuration.CreateAutoAttributeMaps(type);
            }
        }