16 references to TryGetValue
CookieSessionSample (1)
MemoryCacheTicketStore.cs (1)
46_cache.TryGetValue(key, out ticket);
HtmlGenerationWebSite (1)
ProductsService.cs (1)
38if (!_memoryCache.TryGetValue(key, out products))
Microsoft.AspNetCore.Authentication.Negotiate (1)
Internal\LdapAdapter.cs (1)
31if (settings.ClaimsCache.TryGetValue<IEnumerable<string>>(user, out var cachedClaims) && cachedClaims is not null)
Microsoft.AspNetCore.Components.Server (2)
Circuits\CircuitRegistry.cs (2)
240if (DisconnectedCircuits.TryGetValue(circuitId.Secret, out DisconnectedCircuitEntry disconnectedEntry)) 315if (ConnectedCircuits.TryGetValue(circuitId, out circuitHost) || DisconnectedCircuits.TryGetValue(circuitId.Secret, out entry))
Microsoft.AspNetCore.Mvc.Razor (3)
Infrastructure\DefaultFileVersionProvider.cs (1)
54if (Cache.TryGetValue<string>(path, out var value) && value is not null)
RazorViewEngine.cs (2)
189if (!ViewLookupCache.TryGetValue(cacheKey, out ViewLocationCacheResult? cacheResult)) 262if (!ViewLookupCache.TryGetValue<ViewLocationCacheResult>(cacheKey, out var cacheResult) || cacheResult is null)
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (3)
RuntimeViewCompiler.cs (3)
91if (_cache.TryGetValue<Task<CompiledViewDescriptor>>(relativePath, out var cachedResult) && cachedResult is not null) 97if (_cache.TryGetValue(normalizedPath, out cachedResult) && cachedResult is not null) 119if (_cache.TryGetValue<Task<CompiledViewDescriptor>>(normalizedPath, out var result) && result is not null)
Microsoft.AspNetCore.Mvc.TagHelpers (2)
CacheTagHelper.cs (1)
70if (MemoryCache.TryGetValue(cacheKey, out Task<IHtmlContent> cachedResult))
GlobbingUrlBuilder.cs (1)
107if (Cache.TryGetValue(cacheKey, out List<string> files))
Microsoft.AspNetCore.Mvc.TagHelpers.Test (3)
CacheTagHelperTest.cs (3)
502if (!cache.TryGetValue("key1", out TagHelperContent tagHelperContent)) 522var result = cache.TryGetValue(cacheTagKey, out Task<IHtmlContent> cachedValue); 530result = cache.TryGetValue(cacheTagKey, out cachedValue);