1 write to LastModified
Microsoft.Build.Tasks.UnitTests (1)
DownloadFile_Tests.cs (1)
329LastModified = DateTimeOffset.UtcNow.AddDays(-1)
23 references to LastModified
Microsoft.AspNetCore.StaticAssets.Tests (4)
StaticAssetsIntegrationTests.cs (4)
764Assert.NotNull(response.Content.Headers.LastModified); 766Assert.Equal(response.Content.Headers.LastModified.Value.Offset, TimeSpan.Zero); 788req2.Headers.IfModifiedSince = resp1.Content.Headers.LastModified; 825var lastModified = resp1.Content.Headers.LastModified.Value;
Microsoft.AspNetCore.StaticFiles.FunctionalTests (1)
StaticFileMiddlewareTests.cs (1)
113Assert.Equal(response.Content.Headers.LastModified.Value, trimmed);
Microsoft.AspNetCore.StaticFiles.Tests (16)
CacheHeaderTests.cs (4)
170Assert.NotNull(response.Content.Headers.LastModified); 172Assert.Equal(response.Content.Headers.LastModified.Value.Offset, TimeSpan.Zero); 197.And(req => req.Headers.IfModifiedSince = resp1.Content.Headers.LastModified) 239DateTimeOffset lastModified = resp1.Content.Headers.LastModified.Value;
RangeHeaderTests.cs (10)
66req.Headers.Add("If-Range", original.Content.Headers.LastModified.Value.ToString("r")); 83req.Headers.Add("If-Modified-Since", original.Content.Headers.LastModified.Value.AddHours(-1).ToString("r")); 100req.Headers.Add("If-Modified-Since", original.Content.Headers.LastModified.Value.ToString("r")); 117req.Headers.Add("If-Range", original.Content.Headers.LastModified.Value.ToString("r")); 122Assert.Equal(original.Content.Headers.LastModified, resp.Content.Headers.LastModified); 172req.Headers.Add("If-Range", original.Content.Headers.LastModified.Value.Subtract(TimeSpan.FromDays(1)).ToString("r")); 191req.Headers.Add("If-Range", original.Content.Headers.LastModified.Value.Subtract(TimeSpan.FromDays(1)).ToString("r")); 219req.Headers.Add("If-Range", original.Content.Headers.LastModified.Value.ToString("r")); 246req.Headers.Add("If-Range", original.Content.Headers.LastModified.Value.ToString("r"));
StaticFileMiddlewareTests.cs (2)
134Assert.Equal(response.Content.Headers.LastModified.Value, trimmed); 539Assert.Null(response.Content.Headers.LastModified);
Microsoft.Build.Tasks.Core (2)
DownloadFile.cs (2)
354&& response.Content.Headers.LastModified.HasValue 355&& destinationFile.LastWriteTimeUtc > response.Content.Headers.LastModified.Value.UtcDateTime;