6 references to TryParse
Microsoft.AspNetCore.Antiforgery (1)
Internal\DefaultAntiforgery.cs (1)
367CacheControlHeaderValue.TryParse(cacheControlHeader.ToString(), out var cacheControlHeaderValue))
Microsoft.AspNetCore.HeaderParsing (1)
Parsers\CacheControlHeaderValueParser.cs (1)
16if (values.Count != 1 || !CacheControlHeaderValue.TryParse(values[0], out var parsedValue))
Microsoft.AspNetCore.Http.Extensions (1)
HeaderDictionaryTypeExtensions.cs (1)
135private static CacheControlHeaderValue? ParseCacheControlHeaderValue(string value) => CacheControlHeaderValue.TryParse(value, out var result) ? result : null;
Microsoft.AspNetCore.Server.HttpSys (1)
RequestProcessing\RequestContext.FeatureCollection.cs (1)
688if (CacheControlHeaderValue.TryParse(cacheControlHeader.ToString(), out cacheControl) && cacheControl.Public)
Microsoft.Net.Http.Headers.Tests (2)
CacheControlHeaderValueTest.cs (2)
580Assert.True(CacheControlHeaderValue.TryParse(input, out var result)); 586Assert.False(CacheControlHeaderValue.TryParse(input, out var result));