Пример #1
0
        public MemberMapper(MapperOptions options = null, IMappingStrategy strategy = null, IMapGeneratorFactory generator = null, IProjectionGeneratorFactory projection = null)
        {
            this.MappingStrategy = strategy ?? new DefaultMappingStrategy(this);

            this.MapGeneratorFactory = generator ?? new CompiledMapGeneratorFactory();

            this.ProjectionGeneratorFactory = projection ?? new DefaultProjectionGeneratorFactory();

            this.Options = options ?? new MapperOptions();

            this.Data = new MapperDataAccessor(this);
        }
Пример #2
0
        public MemberMapper(IMemberMapperConfiguration config)
        {
            this.MappingStrategy = config.GetMappingStrategy(this);

            this.MapGeneratorFactory = config.GetMapGenerator(this);

            this.ProjectionGeneratorFactory = config.GetProjectionGenerator(this);

            this.Options = config.GetOptions(this);

            this.Data = new MapperDataAccessor(this);
        }