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