private static IMapper GetMapperCore(TypePair pair) { if (CustomMapper.Has(pair)) { return(new CustomMapper(pair)); } if (Converter.IsConvertibleType(pair)) { return(new ConvertibleMapper(pair)); } if (!BindingConfig.Has(pair)) { if (mapperConfig.BindWhenNeed) { Bind(pair); } else { throw new Exception($"没有绑定映射 {pair}"); } } return(new ObjectMapper(pair)); }