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; }
public PropertyMap(PathMap pathMap) { Condition = pathMap.Condition; DestinationProperty = pathMap.DestinationMember; CustomExpression = pathMap.SourceExpression; TypeMap = pathMap.TypeMap; }
public PathMap(PathMap pathMap, TypeMap typeMap, LambdaExpression customSource) : this(pathMap.DestinationExpression, pathMap.MemberPath, typeMap) { CustomSource = customSource; CustomMapExpression = pathMap.CustomMapExpression; Condition = pathMap.Condition; Ignored = pathMap.Ignored; }
public PropertyMap(PathMap pathMap) { DestinationProperty = pathMap.DestinationMember; CustomExpression = pathMap.SourceExpression; TypeMap = pathMap.TypeMap; #if NET40 SourceMembers = new ReadOnlyCollection <MemberInfo>(_memberChain); #endif }
public PathMap FindOrCreatePathMapFor(LambdaExpression destinationExpression, MemberPath path, TypeMap typeMap) { var pathMap = _pathMaps.SingleOrDefault(p => p.MemberPath == path); if (pathMap == null) { pathMap = new PathMap(destinationExpression, path, typeMap); _pathMaps.Add(pathMap); } return(pathMap); }
private void AddPathMap(PathMap pathMap) => _pathMaps.Add(pathMap.MemberPath, pathMap);