示例#1
0
 private static void ExecuteMapMethod(Type sourceType, Type targetType, IMappingContainer container, object sourceValue, object targetValue)
 {
     _mapMethods.GetOrAdd(Pair.Create(sourceType, targetType), key => CreateMapMethod(key.First, key.Second))?.DynamicInvoke(container, sourceValue, targetValue);
 }
示例#2
0
 private static object ExecuteConvertMethod(Type sourceType, Type targetType, IMappingContainer container, object sourceValue)
 {
     return(_convertMethods.GetOrAdd(Pair.Create(sourceType, targetType), key => CreateConvertMethod(key.First, key.Second)).DynamicInvoke(container, sourceValue));
 }