public PathMap(PathMap pathMap, TypeMap typeMap, IncludedMember includedMember) : this(pathMap.DestinationExpression, pathMap.MemberPath, typeMap) { IncludedMember = includedMember.Chain(pathMap.IncludedMember); CustomMapExpression = pathMap.CustomMapExpression; Condition = pathMap.Condition; Ignored = pathMap.Ignored; }
private void ApplyMemberMaps(TypeMap currentMap, IConfigurationProvider configurationProvider) { foreach (var includedMemberExpression in currentMap.GetAllIncludedMembers()) { var includedMap = configurationProvider.GetIncludedTypeMaps(new[] { new TypePair(includedMemberExpression.Body.Type, currentMap.DestinationType) }).Single(); var includedMember = new IncludedMember(includedMap, includedMemberExpression); if (currentMap.AddMemberMap(includedMember)) { ApplyMemberMaps(includedMap, configurationProvider); foreach (var inheritedIncludedMember in includedMap.IncludedMembersTypeMaps) { currentMap.AddMemberMap(includedMember.Chain(inheritedIncludedMember)); } } } }