public static MapperProfile CreateMapByExpression(this MapperProfile profile, Type type, int size, Action <ITypeConfigSyntax <object> > action)
        {
            if (action is null)
            {
                throw new ArgumentNullException(nameof(action));
            }

            var expression = new TypeConfigExpression <object>(type, profile.Name, size);

            action(expression);
            profile.AddMappingFactory(expression);
            return(profile);
        }
        public static MapperFactoryConfig CreateMapByExpression <T>(this MapperFactoryConfig config, string profile, int size, Action <ITypeConfigSyntax <T> > action)
        {
            if (action is null)
            {
                throw new ArgumentNullException(nameof(action));
            }

            var expression = new TypeConfigExpression <T>(typeof(T), profile, size);

            action(expression);
            config.AddMappingFactory(expression);
            return(config);
        }