9 references to TryParseSeconds
Microsoft.AspNetCore.ResponseCaching (7)
ResponseCachingContext.cs (2)
112HeaderUtilities.TryParseSeconds(HttpContext.Response.Headers.CacheControl, CacheControlHeaderValue.SharedMaxAgeString, out _responseSharedMaxAge); 125HeaderUtilities.TryParseSeconds(HttpContext.Response.Headers.CacheControl, CacheControlHeaderValue.MaxAgeString, out _responseMaxAge);
ResponseCachingPolicyProvider.cs (5)
173if (HeaderUtilities.TryParseSeconds(requestCacheControlHeaders, CacheControlHeaderValue.MinFreshString, out var minFresh)) 181HeaderUtilities.TryParseSeconds(cachedCacheControlHeaders, CacheControlHeaderValue.SharedMaxAgeString, out cachedSharedMaxAge); 192HeaderUtilities.TryParseSeconds(requestCacheControlHeaders, CacheControlHeaderValue.MaxAgeString, out requestMaxAge); 195HeaderUtilities.TryParseSeconds(cachedCacheControlHeaders, CacheControlHeaderValue.MaxAgeString, out cachedMaxAge); 211HeaderUtilities.TryParseSeconds(requestCacheControlHeaders, CacheControlHeaderValue.MaxStaleString, out requestMaxStale);
Microsoft.Net.Http.Headers.Tests (2)
HeaderUtilitiesTest.cs (2)
76Assert.True(HeaderUtilities.TryParseSeconds(new StringValues(headerValues), targetValue, out value)); 96Assert.False(HeaderUtilities.TryParseSeconds(new StringValues(headerValues), targetValue!, out value));