3 instantiations of Customer
Microsoft.Extensions.Caching.Hybrid.Tests (3)
16 references to Customer
Microsoft.Extensions.Caching.Hybrid.Tests (16)
BufferReleaseTests.cs (16)
39var first = await cache.GetOrCreateAsync(key, _ => GetAsync());
51var second = await cache.GetOrCreateAsync(key, _ => GetAsync(), _noUnderlying);
57var third = await cache.GetOrCreateAsync(key, _ => GetAsync(), _noUnderlying);
73static ValueTask<Customer> GetAsync() => new(new Customer { Id = 42, Name = "Fred" });
120IHybridCacheSerializer<Customer> serializer = cache.GetSerializer<Customer>();
130var first = await cache.GetOrCreateAsync(key, _ => GetAsync(), _noUnderlying); // we expect this to come from L2, hence NoUnderlying
142var second = await cache.GetOrCreateAsync(key, _ => GetAsync(), _noUnderlying);
148var third = await cache.GetOrCreateAsync(key, _ => GetAsync(), _noUnderlying);
167static ValueTask<Customer> GetAsync() => new(new Customer { Id = 42, Name = "Fred" });
179IHybridCacheSerializer<Customer> serializer = cache.GetSerializer<Customer>();
189var first = await cache.GetOrCreateAsync(key, _ => GetAsync(), _noUnderlying); // we expect this to come from L2, hence NoUnderlying
201var second = await cache.GetOrCreateAsync(key, _ => GetAsync(), _noUnderlying);
207var third = await cache.GetOrCreateAsync(key, _ => GetAsync(), _noUnderlying);
225static ValueTask<Customer> GetAsync() => new(new Customer { Id = 42, Name = "Fred" });