Esempio n. 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;
 }
Esempio n. 2
0
 public PropertyMap(PathMap pathMap)
 {
     Condition           = pathMap.Condition;
     DestinationProperty = pathMap.DestinationMember;
     CustomExpression    = pathMap.SourceExpression;
     TypeMap             = pathMap.TypeMap;
 }
Esempio n. 3
0
 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;
 }
Esempio n. 4
0
        public PropertyMap(PathMap pathMap)
        {
            DestinationProperty = pathMap.DestinationMember;
            CustomExpression    = pathMap.SourceExpression;
            TypeMap             = pathMap.TypeMap;

#if NET40
            SourceMembers = new ReadOnlyCollection <MemberInfo>(_memberChain);
#endif
        }
Esempio n. 5
0
        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);
        }
Esempio n. 6
0
 private void AddPathMap(PathMap pathMap) => _pathMaps.Add(pathMap.MemberPath, pathMap);