예제 #1
0
 public static TReturn Map <TValue1, TValue2, TReturn>(
     this IRecord record,
     Func <TValue1, TValue2, TReturn> map)
 {
     return(map(
                ValueMapper.MapValue <TValue1>(record[0]),
                ValueMapper.MapValue <TValue2>(record[1])));
 }
예제 #2
0
        public IEnumerable MapValues(IEnumerable fromList, Type toInstanceOfType)
        {
            var to = (ICollection <T>) TranslateListWithElements <T> .CreateInstance(toInstanceOfType);

            foreach (var item in fromList)
            {
                to.Add(ValueMapper.MapValue <T>(item));
            }
            return(to);
        }
예제 #3
0
 public static TReturn Map <TValue1, TValue2, TValue3, TValue4, TValue5, TValue6, TReturn>(
     this IRecord record,
     Func <TValue1, TValue2, TValue3, TValue4, TValue5, TValue6, TReturn> map)
 {
     return(map(
                ValueMapper.MapValue <TValue1>(record[0]),
                ValueMapper.MapValue <TValue2>(record[1]),
                ValueMapper.MapValue <TValue3>(record[2]),
                ValueMapper.MapValue <TValue4>(record[3]),
                ValueMapper.MapValue <TValue5>(record[4]),
                ValueMapper.MapValue <TValue6>(record[5])));
 }
예제 #4
0
 public static TReturn Map <TValue1, TValue2, TValue3, TValue4, TValue5, TValue6, TValue7, TValue8, TValue9, TValue10, TValue11, TReturn>(
     this IRecord record,
     Func <TValue1, TValue2, TValue3, TValue4, TValue5, TValue6, TValue7, TValue8, TValue9, TValue10, TValue11, TReturn> map)
 {
     return(map(
                ValueMapper.MapValue <TValue1>(record[0]),
                ValueMapper.MapValue <TValue2>(record[1]),
                ValueMapper.MapValue <TValue3>(record[2]),
                ValueMapper.MapValue <TValue4>(record[3]),
                ValueMapper.MapValue <TValue5>(record[4]),
                ValueMapper.MapValue <TValue6>(record[5]),
                ValueMapper.MapValue <TValue7>(record[6]),
                ValueMapper.MapValue <TValue8>(record[7]),
                ValueMapper.MapValue <TValue9>(record[8]),
                ValueMapper.MapValue <TValue10>(record[9]),
                ValueMapper.MapValue <TValue11>(record[10])));
 }
예제 #5
0
 public static TReturn Map <TReturn>(
     this IRecord record)
 {
     return(ValueMapper.MapValue <TReturn>(record[0]));
 }