public IEnumerable MapValues(IEnumerable fromList, Type toInstanceOfType)
        {
            var to = (ICollection <TResult>) TranslateListWithElements <TResult>
                     .CreateInstance(toInstanceOfType);

            foreach (object item in fromList)
            {
                to.Add(ValueMapper.MapValue <TResult>(item));
            }

            return(to);
        }
示例#2
0
 public static TReturn Map <TReturn>(this IRecord record)
 {
     return(ValueMapper.MapValue <TReturn>(record[0]));
 }