public Delegate GetMapperFunc(MapRequest mapRequest) => _mapPlanCache.GetOrAdd(mapRequest).Typed;
Beispiel #2
0
 public UntypedMapperFunc GetUntypedMapperFunc(MapRequest mapRequest)
 {
     return(_mapPlanCache.GetOrAdd(mapRequest, _createMapperFuncs).Untyped);
 }
 public Func <TSource, TDestination, ResolutionContext, TDestination> GetMapperFunc <TSource, TDestination>(MapRequest mapRequest)
 => (Func <TSource, TDestination, ResolutionContext, TDestination>)GetMapperFunc(mapRequest);
Beispiel #4
0
 public MapperFuncs(MapRequest mapRequest, LambdaExpression typedExpression)
 {
     Typed    = typedExpression.Compile();
     _untyped = new Lazy <UntypedMapperFunc>(() => Wrap(mapRequest, typedExpression).Compile());
 }
Beispiel #5
0
 public Delegate GetMapperFunc(MapRequest mapRequest)
 {
     return(_mapPlanCache.GetOrAdd(mapRequest, _createMapperFuncs).Typed);
 }
Beispiel #6
0
 public MapperFuncs(MapRequest mapRequest, TypeMap typeMap) : this(mapRequest, GenerateTypeMapExpression(mapRequest, typeMap))
 {
 }
Beispiel #7
0
 public MapperFuncs(MapRequest mapRequest, IObjectMapper mapperToUse, MapperConfiguration mapperConfiguration) : this(mapRequest, GenerateObjectMapperExpression(mapRequest, mapperToUse, mapperConfiguration))
 {
 }
Beispiel #8
0
 public UntypedMapperFunc GetUntypedMapperFunc(MapRequest mapRequest) => _mapPlanCache.GetOrAdd(mapRequest).Untyped;
Beispiel #9
0
 private MapperFuncs CreateMapperFuncs(MapRequest mapRequest) => new MapperFuncs(mapRequest, BuildExecutionPlan(mapRequest));
Beispiel #10
0
 private MapperFuncs CreateMapperFuncs(MapRequest mapRequest)
 {
     return(new MapperFuncs(mapRequest, BuildExecutionPlan(mapRequest)));
 }
Beispiel #11
0
 public MapperFuncs(MapRequest mapRequest, IObjectMapper mapperToUse) : this(mapRequest, GenerateObjectMapperExpression(mapRequest, mapperToUse))
 {
 }
Beispiel #12
0
        private Delegate CompileExecutionPlan(MapRequest mapRequest)
        {
            var executionPlan = BuildExecutionPlan(mapRequest);

            return(executionPlan.Compile()); // breakpoint here to inspect all execution plans
        }
Beispiel #13
0
 private Delegate GetExecutionPlan(MapRequest mapRequest) => _executionPlans.GetOrAdd(mapRequest);
Beispiel #14
0
 public Func <TSource, TDestination, ResolutionContext, TDestination> GetExecutionPlan <TSource, TDestination>(MapRequest mapRequest)
 => (Func <TSource, TDestination, ResolutionContext, TDestination>)GetExecutionPlan(mapRequest);