protected AbstractProviderRepository(ProviderMetadata providerMetadata, IFrameworkContext frameworkContext)
        {
            CanRead = true;
            ProviderMetadata = providerMetadata;
            FrameworkContext = frameworkContext;
            RepositoryScopedCache = new DictionaryScopedCache();

            //HiveContext = new RepositoryContext(RuntimeCacheProvider.Default, PerHttpRequestCacheProvider.Default, frameworkContext);
        }
 /// <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);
 }
        private IFrameworkContext GetFrameworkContext()
        {
            TextManager textManager = LocalizationConfig.SetupDefault();
            MappingEngineCollection typeMappers = GetTypeMappers();

            AbstractScopedCache scopedCache = new DictionaryScopedCache();
            AbstractApplicationCache applicationCache = new HttpRuntimeApplicationCache();
            AbstractFinalizer finalizer = new NestedLifetimeFinalizer();
            var taskMgr = new ApplicationTaskManager(Enumerable.Empty<Lazy<AbstractTask, TaskMetadata>>());
            IFrameworkContext frameworkContext = new DefaultFrameworkContext(textManager, typeMappers, scopedCache,
                                                                             applicationCache, finalizer, taskMgr);

            return frameworkContext;
        }