public static Expression Process(Expression lambda, IObjectMappingData mappingData) { var targetMemberDatas = GetAllTargetMemberDatas(mappingData); if (targetMemberDatas.None()) { return(lambda); } var finder = new EnumMappingMismatchFinder( mappingData.MapperData, targetMemberDatas); finder.Visit(lambda); var updatedLambda = lambda.Replace(finder._assignmentReplacements); return(updatedLambda); }
private Expression GetFinalMappingExpression() { var mappingWithEnumMismatches = EnumMappingMismatchFinder.Process(_mapping, _mapperData); return(mappingWithEnumMismatches); }
private Expression GetFinalMappingLambda() { var lambdaWithEnumMismatches = EnumMappingMismatchFinder.Process(Lambda, _mappingData); return(lambdaWithEnumMismatches); }