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); }
public void Register_Memory_Cache_Null_Throws() { ITroveCacheFactory factory = null; Assert.Throws <ArgumentNullException>(() => factory.RegisterRedisCacheFactory()); }