private MappingConfigContinuation <TSource, TTarget> CreateCallbackFactory <TAction>(TAction callback) { var callbackLambda = ConfiguredLambdaInfo.ForAction(callback, typeof(TSource), typeof(TTarget)); var creationCallbackFactory = new MappingCallbackFactory( ConfigInfo.ForTargetType <TTarget>(), CallbackPosition, callbackLambda, _targetMember); ConfigInfo.MapperContext.UserConfigurations.Add(creationCallbackFactory); return(new MappingConfigContinuation <TSource, TTarget>(ConfigInfo)); }
private MappingConfigContinuation <TSource, TTarget> CreateCallbackFactory <TAction>(TAction callback) { ThrowIfStructMemberCallback(); var callbackLambda = ConfiguredLambdaInfo .ForAction(callback, _configInfo, typeof(TSource), typeof(TTarget)); var creationCallbackFactory = new MappingCallbackFactory( _configInfo, callbackLambda, _targetMember); _configInfo.UserConfigurations.Add(creationCallbackFactory); return(new MappingConfigContinuation <TSource, TTarget>(_configInfo)); }
public void Add(MappingCallbackFactory callbackFactory) => MappingCallbackFactories.Add(callbackFactory);