Inheritance: AbstractMappingEngine
 public void SetTypeMappers(MappingEngineCollection coll)
 {
     foreach (var binder in coll.Binders)
     {
         TypeMappers.Add(binder);
     }
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="T:System.Object"/> class.
 /// </summary>
 public FakeFrameworkContext()
 {
     var fakeMapperList = new List<Lazy<AbstractMappingEngine, TypeMapperMetadata>>();
     TypeMappers = new MappingEngineCollection(fakeMapperList);
     CurrentLanguage = Thread.CurrentThread.CurrentCulture;
     TextManager = LocalizationConfig.SetupDefault();
     ScopedFinalizer = new NestedLifetimeFinalizer();
     TaskManager = new ApplicationTaskManager(Enumerable.Empty<Lazy<AbstractTask, TaskMetadata>>());
     ApplicationCache = new HttpRuntimeApplicationCache();
     ScopedCache = new ThreadStaticScopedCache();
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="T:System.Object"/> class.
 /// </summary>
 public FakeFrameworkContext(ISerializer serializer = null)
 {
     serializer = serializer ?? new ServiceStackSerialiser();
     var fakeMapperList = new List<Lazy<AbstractMappingEngine, TypeMapperMetadata>>();
     TypeMappers = new MappingEngineCollection(fakeMapperList);
     CurrentLanguage = Thread.CurrentThread.CurrentCulture;
     TextManager = LocalizationConfig.SetupDefault();
     ScopedFinalizer = new NestedLifetimeFinalizer();
     TaskManager = new ApplicationTaskManager(Enumerable.Empty<Lazy<AbstractTask, TaskMetadata>>());
     ApplicationCache = new HttpRuntimeApplicationCache();
     ScopedCache = new DictionaryScopedCache();
     Caches = new DefaultFrameworkCaches(new DictionaryCacheProvider(), new RuntimeCacheProvider());
     Serialization = new SerializationService(serializer);
 }
 public FakeFrameworkContext(MappingEngineCollection typeMappers) : this()
 {
     TypeMappers = typeMappers;
 }
        private MappingEngineCollection GetTypeMappers()
        {
            var webmModelMapper = new RdbmsModelMapper(null, null);
            var binders = new List<Lazy<AbstractMappingEngine, TypeMapperMetadata>>();
            var metadata = new TypeMapperMetadata(true);
            var bind = new Lazy<AbstractMappingEngine, TypeMapperMetadata>(() => webmModelMapper, metadata);
            binders.Add(bind);
            /*
            binders.Add(new Lazy<AbstractMappingEngine, TypeMapperMetadata>(() => new ManualMapperv2(new NhLookupHelper(entityRepositoryFactory), providerMetadata),
                                                                            metadata));
            */

            /*
            MapResolverContext resolverContext = new MapResolverContext();
            var cmsModelMapper = new RenderTypesModelMapper(resolverContext);
            */

            var typeMappers = new MappingEngineCollection(binders);
            typeMappers.Configure();
            return typeMappers;
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="DefaultFrameworkContext"/> class.
 /// </summary>
 /// <param name="textManager">The text manager.</param>
 /// <param name="typeMappers">The type mappers.</param>
 /// <param name="scopedCache">The scoped cache.</param>
 /// <param name="applicationCache">The application cache</param>
 /// <param name="finalizer">The finalizer.</param>
 /// <param name="taskMgr">The task manager.</param>
 /// <param name="caches">The lifetime-managed cache providers.</param>
 public DefaultFrameworkContext(
     TextManager textManager, 
     MappingEngineCollection typeMappers, 
     AbstractScopedCache scopedCache,
     AbstractApplicationCache applicationCache,
     AbstractFinalizer finalizer,
     ApplicationTaskManager taskMgr,
     IFrameworkCaches caches,
     AbstractSerializationService serialization)
     : this(scopedCache, applicationCache, finalizer, caches, serialization)
 {
     TextManager = textManager;
     TypeMappers = typeMappers;
     TaskManager = taskMgr;
 }