9 writes to Expires
Microsoft.AspNetCore.Http.Features (1)
CookieOptions.cs (1)
117Expires = Expires,
Microsoft.Net.Http.Headers (1)
SetCookieHeaderValue.cs (1)
553result.Expires = expirationDate;
Microsoft.Net.Http.Headers.Tests (7)
SetCookieHeaderValueTest.cs (7)
18Expires = new DateTimeOffset(1994, 11, 6, 8, 49, 37, TimeSpan.Zero), 44Expires = new DateTimeOffset(1994, 11, 6, 8, 49, 37, TimeSpan.Zero), 135Expires = new DateTimeOffset(1994, 11, 6, 8, 49, 37, TimeSpan.Zero), 159Expires = new DateTimeOffset(1994, 11, 6, 8, 49, 37, TimeSpan.Zero), 238Expires = new DateTimeOffset(1994, 11, 6, 8, 49, 37, TimeSpan.Zero), 259Expires = new DateTimeOffset(1994, 11, 6, 8, 49, 37, TimeSpan.Zero), 271Expires = new DateTimeOffset(1994, 11, 6, 8, 49, 37, TimeSpan.Zero),
41 references to Expires
Microsoft.AspNetCore.Authentication.Test (4)
OpenIdConnect\OpenIdConnectChallengeTests.cs (4)
441Assert.True(nonceCookie.Expires.HasValue); 442Assert.True(nonceCookie.Expires > DateTime.UtcNow); 449Assert.True(correlationCookie.Expires.HasValue); 450Assert.True(nonceCookie.Expires > DateTime.UtcNow);
Microsoft.AspNetCore.CookiePolicy.Test (15)
CookieConsentTests.cs (15)
222Assert.True(consentCookie.Expires.HasValue); 223Assert.True(consentCookie.Expires.Value > DateTimeOffset.Now + TimeSpan.FromDays(364)); 225Assert.NotNull(consentCookie.Expires); 230Assert.Null(testCookie.Expires); 273Assert.NotNull(consentCookie.Expires); 404Assert.Null(testCookie.Expires); 409Assert.NotNull(consentCookie.Expires); 451Assert.NotNull(consentCookie.Expires); 516Assert.NotNull(testCookie.Expires); 580Assert.NotNull(consentCookie.Expires); 588Assert.NotNull(manualCookie.Expires); // Expires may not exactly match to the second. 633Assert.NotNull(consentCookie.Expires); 641Assert.NotNull(manualCookie.Expires); // Expires may not exactly match to the second. 678Assert.NotNull(consentCookie.Expires); 686Assert.NotNull(manualCookie.Expires); // Expires may not exactly match to the second.
Microsoft.AspNetCore.Mvc.FunctionalTests (12)
TempDataInCookiesTest.cs (6)
103Assert.NotNull(setCookieHeaderValue.Expires); 104Assert.True(setCookieHeaderValue.Expires < DateTimeOffset.Now); // expired cookie 136Assert.Null(setCookieHeader.Expires); 159Assert.NotNull(setCookieHeader.Expires); 160Assert.True(setCookieHeader.Expires < DateTimeOffset.Now); // expired cookie 189Assert.Null(setCookieHeader.Expires);
TempDataInCookiesUsingCookieConsentTest.cs (2)
114if (cookie.Expires == null || cookie.Expires >= DateTimeOffset.UtcNow)
TempDataPropertyTest.cs (2)
167if (cookie.Expires == null || cookie.Expires >= DateTimeOffset.UtcNow)
TempDataTestBase.cs (2)
270if (cookie.Expires == null || cookie.Expires >= DateTimeOffset.UtcNow)
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (2)
CookieTempDataProviderTest.cs (2)
289Assert.NotNull(cookie.Expires); 290Assert.True(cookie.Expires.Value < DateTimeOffset.Now); // expired cookie
Microsoft.Net.Http.Headers (8)
SetCookieHeaderValue.cs (8)
196if (Expires.HasValue) 260if (headerValue.Expires is DateTimeOffset expiresValue) 343if (Expires.HasValue) 345AppendSegment(builder, ExpiresToken, HeaderUtilities.FormatDate(Expires.GetValueOrDefault())); 725&& Expires.Equals(other.Expires) 740^ (Expires.HasValue ? Expires.GetHashCode() : 0)