private void Expand(MappingPlanData planData) { if (_generatedPlanData.Contains(planData)) { return; } _generatedPlanData.Add(planData); var mapCalls = MapCallFinder.FindIn(planData.Lambda); foreach (var mapCall in mapCalls) { Func <MethodCallExpression, MappingPlanData> mappingLambdaFactory; if (IsObjectMemberMapping(mapCall)) { mappingLambdaFactory = planData.GetChildMappingPlanData; } else { mappingLambdaFactory = planData.GetElementMappingPlanData; } Expand(mappingLambdaFactory.Invoke(mapCall)); } }
public static IEnumerable <MethodCallExpression> FindIn(Expression mappingLambda) { var finder = new MapCallFinder(); finder.Visit(mappingLambda); return(finder._mapCalls); }