示例#1
0
 private static Expression SwapForSourceTargetAndIndex(SwapArgs swapArgs) =>
 ReplaceParameters(swapArgs, c => c.SourceAccess, c => c.TargetAccess, c => c.Index);
示例#2
0
 private static Expression SwapForSourceTargetAndCreatedObject(SwapArgs swapArgs) =>
 ReplaceParameters(swapArgs, c => c.SourceAccess, c => c.TargetAccess, c => c.CreatedObject);
示例#3
0
 private static Expression SwapForSource(SwapArgs swapArgs) =>
 ReplaceParameters(swapArgs, c => c.SourceAccess);
 private static Expression SwapNothing(SwapArgs swapArgs) => swapArgs.Lambda.Body;
 public MappingContextInfo(SwapArgs swapArgs, Type[] contextTypes)
     : this(swapArgs, swapArgs.MapperData.MappingDataObject, contextTypes)
 {
 }
        private static MappingContextInfo GetAppropriateMappingContext(Type[] contextTypes, SwapArgs swapArgs)
        {
            if (swapArgs.MapperData.TypesMatch(contextTypes))
            {
                return(new MappingContextInfo(swapArgs, contextTypes));
            }

            var dataAccess = swapArgs.MapperData.GetAppropriateMappingContextAccess(contextTypes);

            return(new MappingContextInfo(swapArgs, dataAccess, contextTypes));
        }
示例#7
0
 public MappingContextInfo(SwapArgs swapArgs)
     : this(swapArgs, swapArgs.MapperData.MappingDataObject)
 {
 }