Пример #1
0
        public static TTo[] MapToArray <TFrom, TTo>(this IMapperResolver <TTo> mapper, IEnumerable <TFrom> items, params object[] options)
        {
            var opt = new MappingOptions(options);

            return(mapper.Map(items, opt).ToArray());
        }
Пример #2
0
        public static TTo Map <TFrom, TTo>(this IMapperResolver <TTo> mapper, TFrom item, params object[] options)
        {
            var opt = new MappingOptions(options);

            return(mapper.Map(item, opt, opt.Get <TTo>()));
        }