Exemplo n.º 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);
 }
Exemplo n.º 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));
 }