public Delegate GetMapperFunc(MapRequest mapRequest) => _mapPlanCache.GetOrAdd(mapRequest).Typed;
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);
public MapperFuncs(MapRequest mapRequest, LambdaExpression typedExpression) { Typed = typedExpression.Compile(); _untyped = new Lazy <UntypedMapperFunc>(() => Wrap(mapRequest, typedExpression).Compile()); }
public Delegate GetMapperFunc(MapRequest mapRequest) { return(_mapPlanCache.GetOrAdd(mapRequest, _createMapperFuncs).Typed); }
public MapperFuncs(MapRequest mapRequest, TypeMap typeMap) : this(mapRequest, GenerateTypeMapExpression(mapRequest, typeMap)) { }
public MapperFuncs(MapRequest mapRequest, IObjectMapper mapperToUse, MapperConfiguration mapperConfiguration) : this(mapRequest, GenerateObjectMapperExpression(mapRequest, mapperToUse, mapperConfiguration)) { }
public UntypedMapperFunc GetUntypedMapperFunc(MapRequest mapRequest) => _mapPlanCache.GetOrAdd(mapRequest).Untyped;
private MapperFuncs CreateMapperFuncs(MapRequest mapRequest) => new MapperFuncs(mapRequest, BuildExecutionPlan(mapRequest));
private MapperFuncs CreateMapperFuncs(MapRequest mapRequest) { return(new MapperFuncs(mapRequest, BuildExecutionPlan(mapRequest))); }
public MapperFuncs(MapRequest mapRequest, IObjectMapper mapperToUse) : this(mapRequest, GenerateObjectMapperExpression(mapRequest, mapperToUse)) { }
private Delegate CompileExecutionPlan(MapRequest mapRequest) { var executionPlan = BuildExecutionPlan(mapRequest); return(executionPlan.Compile()); // breakpoint here to inspect all execution plans }
private Delegate GetExecutionPlan(MapRequest mapRequest) => _executionPlans.GetOrAdd(mapRequest);
public Func <TSource, TDestination, ResolutionContext, TDestination> GetExecutionPlan <TSource, TDestination>(MapRequest mapRequest) => (Func <TSource, TDestination, ResolutionContext, TDestination>)GetExecutionPlan(mapRequest);