2 implementations of TryGetValue
Microsoft.Extensions.Caching.Hybrid.Tests (1)
StampedeTests.cs (1)
59bool IMemoryCache.TryGetValue(object key, out object? value) => throw new NotSupportedException("Intentionally not provided");
Microsoft.Extensions.Caching.Memory (1)
MemoryCache.cs (1)
221public bool TryGetValue(object key, out object? result)
10 references to TryGetValue
Microsoft.Extensions.Caching.Abstractions (5)
MemoryCacheExtensions.cs (5)
23cache.TryGetValue(key, out object? value); 36cache.TryGetValue(key, out object? value); 50if (cache.TryGetValue(key, out object? result)) 186if (!cache.TryGetValue(key, out object? result)) 226if (!cache.TryGetValue(key, out object? result))
Microsoft.Extensions.Caching.Hybrid (2)
Internal\DefaultHybridCache.cs (1)
311if (_localCache.TryGetValue(key, out object? untyped) && untyped is CacheItem<T> typed)
Internal\DefaultHybridCache.Debug.cs (1)
20if (_localCache.TryGetValue(key, out object? untyped) && untyped is CacheItem typed)
Microsoft.Extensions.Caching.Hybrid.Tests (3)
ServiceConstructionTests.cs (3)
224Assert.True(localCache.TryGetValue("entry1", out object? _)); 225Assert.True(localCache.TryGetValue("entry2", out object? _)); 228Assert.False(localCache.TryGetValue("entry3", out object? _));