private static Expression GetPopulationCallbackOrNull( InvocationPosition position, IMemberPopulator memberPopulator, IObjectMappingData mappingData) { return(memberPopulator.MapperData.GetMappingCallbackOrNull(position, mappingData.MapperData)); }
public Expression GetCallbackOrNull( InvocationPosition position, IQualifiedMemberContext context, IMemberMapperData mapperData) { return(_mappingCallbackFactories?.FirstOrDefault(f => f.AppliesTo(position, context))?.Create(mapperData)); }
public CallbackSpecifier(MapperContext mapperContext, InvocationPosition invocationPosition) : this( MappingConfigInfo .AllRuleSetsAndSourceTypes(mapperContext) .ForTargetType <TTarget>() .WithInvocationPosition(invocationPosition), QualifiedMember.None) { }
public static Expression GetMappingCallbackOrNull( this IQualifiedMemberContext context, InvocationPosition invocationPosition, IMemberMapperData mapperData) { return(mapperData .MapperContext .UserConfigurations .GetCallbackOrNull(invocationPosition, context, mapperData)); }
public virtual bool AppliesTo(InvocationPosition invocationPosition, IQualifiedMemberContext context) => (InvocationPosition == invocationPosition) && base.AppliesTo(context);
public override bool AppliesTo(InvocationPosition invocationPosition, IQualifiedMemberContext context) => context.TargetMember.Type.IsAssignableTo(_creationTargetType) && base.AppliesTo(invocationPosition, context);
private static Expression GetCreationCallbackOrNull(InvocationPosition invocationPosition, IMemberMapperData mapperData) => mapperData.MapperContext.UserConfigurations.GetCreationCallbackOrNull(invocationPosition, mapperData);
public InstanceCreationCallbackSpecifier(MappingConfigInfo configInfo, InvocationPosition invocationPosition) { _configInfo = configInfo.WithInvocationPosition(invocationPosition); }
public InstanceCreationCallbackSpecifier(MapperContext mapperContext, InvocationPosition invocationPosition) : this(MappingConfigInfo.AllRuleSetsAndSourceTypes(mapperContext).ForTargetType <TTarget>(), invocationPosition) { }
public Expression GetCreationCallbackOrNull(InvocationPosition position, IMemberMapperData mapperData) => _creationCallbackFactories?.FirstOrDefault(f => f.AppliesTo(position, mapperData))?.Create(mapperData);
public MappingConfigInfo WithInvocationPosition(InvocationPosition position) { InvocationPosition = position; return(this); }