示例#1
0
        /// <summary>
        /// Maps the collection.
        /// </summary>
        /// <typeparam name="TFrom">The type of from.</typeparam>
        /// <typeparam name="TTo">The type of to.</typeparam>
        /// <param name="from">The from objects collection.</param>
        /// <returns>The output mapped collection.</returns>
        public virtual IEnumerable <TTo> MapCollection <TFrom, TTo>(IEnumerable <TFrom> @from)
        {
            AssertCore.ArgumentNotNullOrEmpty(@from, "@from");

            ObjectsMapper <TFrom, TTo> mapper = this.GetMapper <TFrom, TTo>();

            return(mapper.MapEnum(@from));
        }
示例#2
0
        /// <summary>
        /// 属性赋值(集合)
        /// </summary>
        /// <param name="fromModelList">集合</param>
        /// <returns></returns>
        public static IList <ToModel> List(IEnumerable <FromModel> fromModelList)
        {
            IList <ToModel> toModelList = mapper.MapEnum(fromModelList).ToList();

            return(toModelList);
        }
示例#3
0
 public List <A2> EmitMapper_SimpleList100()
 {
     return(_simpleEmitMapper.MapEnum(_simple100List).ToList());
 }