18 references to CustomMemoryDistributedCache1
Microsoft.Extensions.Caching.Hybrid.Tests (18)
ServiceConstructionTests.cs (18)
60
services.TryAddKeyedSingleton<IDistributedCache,
CustomMemoryDistributedCache1
>(typeof(
CustomMemoryDistributedCache1
));
61
services.AddHybridCache(options => options.DistributedCacheServiceKey = typeof(
CustomMemoryDistributedCache1
));
67
var
backend = Assert.IsType<
CustomMemoryDistributedCache1
>(hybrid.BackendCache);
68
Assert.Same(typeof(
CustomMemoryDistributedCache1
), hybridOptions.DistributedCacheServiceKey);
69
Assert.Same(backend, provider.GetRequiredKeyedService<IDistributedCache>(typeof(
CustomMemoryDistributedCache1
)));
76
services.AddHybridCache(options => options.DistributedCacheServiceKey = typeof(
CustomMemoryDistributedCache1
));
87
services.AddHybridCache(options => options.DistributedCacheServiceKey = typeof(
CustomMemoryDistributedCache1
));
185
services.TryAddKeyedSingleton<IDistributedCache,
CustomMemoryDistributedCache1
>(typeof(
CustomMemoryDistributedCache1
));
188
services.AddKeyedHybridCache("one", options => options.DistributedCacheServiceKey = typeof(
CustomMemoryDistributedCache1
));
194
var
cacheOneBackend = Assert.IsType<
CustomMemoryDistributedCache1
>(cacheOne.BackendCache);
195
Assert.Same(typeof(
CustomMemoryDistributedCache1
), cacheOneOptions.DistributedCacheServiceKey);
196
Assert.Same(cacheOneBackend, provider.GetRequiredKeyedService<IDistributedCache>(typeof(
CustomMemoryDistributedCache1
)));
210
services.AddSingleton<IDistributedCache,
CustomMemoryDistributedCache1
>();
516
services.AddSingleton<IDistributedCache,
CustomMemoryDistributedCache1
>();