Example #1
0
 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;
 }
Example #2
0
 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));
             }
         }
     }
 }