コード例 #1
0
        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);
        }
コード例 #2
0
        private Expression GetFinalMappingExpression()
        {
            var mappingWithEnumMismatches = EnumMappingMismatchFinder.Process(_mapping, _mapperData);

            return(mappingWithEnumMismatches);
        }
コード例 #3
0
        private Expression GetFinalMappingLambda()
        {
            var lambdaWithEnumMismatches = EnumMappingMismatchFinder.Process(Lambda, _mappingData);

            return(lambdaWithEnumMismatches);
        }