public static ITroveCacheFactory RegisterRedisCacheFactory(this ITroveCacheFactory factory)
        {
            Contract.NotNull(factory, nameof(factory));

            factory.RegisterFactory <RedisProviderConfig>((config) => new RedisCacheProviderFactory(config));
            return(factory);
        }
        public static ITroveCacheFactory RegisterMemoryCacheFactory(this ITroveCacheFactory factory)
        {
            Contract.NotNull(factory, nameof(factory));

            factory.RegisterFactory <MemoryProviderConfig>((config) => new MemoryCacheProviderFactory());
            return(factory);
        }
Example #3
0
        public void Register_Memory_Cache_Null_Throws()
        {
            ITroveCacheFactory factory = null;

            Assert.Throws <ArgumentNullException>(() => factory.RegisterRedisCacheFactory());
        }