public static void Bind <TSource, TTarget>(Action <IBindingConfig <TSource, TTarget> > config = null) { TypePair typePair = TypePair.Create <TSource, TTarget>(); if (config == null) { Bind(typePair); } else { var bindingConfig = new BindingConfig <TSource, TTarget>(); config(bindingConfig); BindingConfig.Add(typePair, bindingConfig); CustomMapper.Remove(typePair); targetMapperBuilder.Build(typePair); } }
internal static void Bind(TypePair typePair) { BindingConfig.Add(typePair, null); CustomMapper.Remove(typePair); targetMapperBuilder.Build(typePair); }