11 references to TryParseDate
Microsoft.AspNetCore.HeaderParsing (1)
Parsers\DateTimeOffsetParser.cs (1)
17
if (values.Count != 1 || !HeaderUtilities.
TryParseDate
(values[0], out var parsedValue))
Microsoft.AspNetCore.Http.Extensions (1)
HeaderDictionaryTypeExtensions.cs (1)
149
private static DateTimeOffset? ParseCacheDateTimeOffset(string value) => HeaderUtilities.
TryParseDate
(value, out var result) ? result : null;
Microsoft.AspNetCore.ResponseCaching (6)
ResponseCachingContext.cs (2)
65
if (HeaderUtilities.
TryParseDate
(HttpContext.Response.Headers.Date.ToString(), out date))
92
if (HeaderUtilities.
TryParseDate
(HttpContext.Response.Headers.Expires.ToString(), out expires))
ResponseCachingMiddleware.cs (3)
463
if (!HeaderUtilities.
TryParseDate
(cachedResponseHeaders.LastModified.ToString(), out modified) &&
464
!HeaderUtilities.
TryParseDate
(cachedResponseHeaders.Date.ToString(), out modified))
470
if (HeaderUtilities.
TryParseDate
(ifModifiedSince.ToString(), out modifiedSince) &&
ResponseCachingPolicyProvider.cs (1)
234
if (HeaderUtilities.
TryParseDate
(context.CachedResponseHeaders.Expires.ToString(), out expires) &&
Microsoft.AspNetCore.Server.HttpSys (1)
RequestProcessing\RequestContext.FeatureCollection.cs (1)
700
if (HeaderUtilities.
TryParseDate
(response.Headers[HeaderNames.Expires].ToString(), out expirationDate))
Microsoft.Net.Http.Headers.Tests (2)
DateParserTest.cs (2)
14
Assert.True(HeaderUtilities.
TryParseDate
(input, out var result));
30
Assert.False(HeaderUtilities.
TryParseDate
(input, out var result));