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

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