private TypeMap GetCachedMap(TypePair initialTypes, TypePair types) => (types != initialTypes && _typeMapPlanCache.TryGetValue(types, out var typeMap)) ? typeMap : null;
Example #2
0
 public MapRequest(TypePair requestedTypes, TypePair runtimeTypes, IMemberMap memberMap = null)
     : this(requestedTypes, runtimeTypes, new MapperConfiguration.DefaultTypeMapConfig(requestedTypes), memberMap)
 {
 }
 public TypeMap ResolveTypeMap(TypePair typePair)
 => ResolveTypeMap(typePair, new DefaultTypeMapConfig(typePair));
        public TypeMap ResolveTypeMap(Type sourceType, Type destinationType, ITypeMapConfiguration inlineConfiguration)
        {
            var typePair = new TypePair(sourceType, destinationType);

            return(ResolveTypeMap(typePair, inlineConfiguration));
        }
        public TypeMap ResolveTypeMap(Type sourceType, Type destinationType)
        {
            var typePair = new TypePair(sourceType, destinationType);

            return(ResolveTypeMap(typePair, new DefaultTypeMapConfig(typePair)));
        }
 public TypeMap FindTypeMapFor(TypePair typePair) => _typeMapRegistry.GetOrDefault(typePair);
        public LambdaExpression BuildExecutionPlan(Type sourceType, Type destinationType)
        {
            var typePair = new TypePair(sourceType, destinationType);

            return(BuildExecutionPlan(new MapRequest(typePair, typePair)));
        }