259 instantiations of EntityTagHeaderValue
FilesWebSite (5)
Microsoft.AspNetCore.Http.Extensions.Tests (1)
Microsoft.AspNetCore.Http.Results.Tests (47)
Microsoft.AspNetCore.Mvc.Core.Test (62)
Microsoft.AspNetCore.OutputCaching.Tests (11)
OutputCacheMiddlewareTests.cs (8)
309{ new EntityTagHeaderValue("\"tag\""), new EntityTagHeaderValue("\"tag\"") },
310{ new EntityTagHeaderValue("\"tag\"", true), new EntityTagHeaderValue("\"tag\"") },
311{ new EntityTagHeaderValue("\"tag\""), new EntityTagHeaderValue("\"tag\"", true) },
312{ new EntityTagHeaderValue("\"tag\"", true), new EntityTagHeaderValue("\"tag\"", true) }
Microsoft.AspNetCore.ResponseCaching.Tests (11)
ResponseCachingMiddlewareTests.cs (8)
306{ new EntityTagHeaderValue("\"tag\""), new EntityTagHeaderValue("\"tag\"") },
307{ new EntityTagHeaderValue("\"tag\"", true), new EntityTagHeaderValue("\"tag\"") },
308{ new EntityTagHeaderValue("\"tag\""), new EntityTagHeaderValue("\"tag\"", true) },
309{ new EntityTagHeaderValue("\"tag\"", true), new EntityTagHeaderValue("\"tag\"", true) }
Microsoft.AspNetCore.StaticFiles (1)
Microsoft.Net.Http.Headers (3)
Microsoft.Net.Http.Headers.Tests (118)
408 references to EntityTagHeaderValue
FilesWebSite (4)
Microsoft.AspNetCore.HeaderParsing (7)
Microsoft.AspNetCore.Http.Extensions (14)
Microsoft.AspNetCore.Http.Extensions.Tests (5)
Microsoft.AspNetCore.Http.Results (71)
Results.cs (20)
284/// This API is an alias for <see cref="Bytes(byte[], string, string?, bool, DateTimeOffset?, EntityTagHeaderValue?)"/>.</para>
291/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> associated with the file.</param>
299EntityTagHeaderValue? entityTag = null)
309/// This API is an alias for <see cref="File(byte[], string, string?, bool, DateTimeOffset?, EntityTagHeaderValue?)"/>.</para>
316/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> associated with the file.</param>
324EntityTagHeaderValue? entityTag = null)
339/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> associated with the file.</param>
347EntityTagHeaderValue? entityTag = null)
357/// This API is an alias for <see cref="Stream(Stream, string, string?, DateTimeOffset?, EntityTagHeaderValue?, bool)"/>.
365/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> to be configure the <c>ETag</c> response header
377EntityTagHeaderValue? entityTag = null,
388/// This API is an alias for <see cref="File(Stream, string, string?, DateTimeOffset?, EntityTagHeaderValue?, bool)"/>.
396/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> to be configure the <c>ETag</c> response header
408EntityTagHeaderValue? entityTag = null,
424/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> to be configure the <c>ETag</c> response header
436EntityTagHeaderValue? entityTag = null,
448/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> to be configure the <c>ETag</c> response header
456EntityTagHeaderValue? entityTag = null)
470/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> associated with the file.</param>
478EntityTagHeaderValue? entityTag = null,
src\Shared\ResultsHelpers\FileResultHelper.cs (11)
96EntityTagHeaderValue? etag,
164EntityTagHeaderValue? etag,
197EntityTagHeaderValue? etag,
263IList<EntityTagHeaderValue> etagHeader,
264EntityTagHeaderValue etag,
271foreach (var entityTag in etagHeader)
273if (entityTag.Equals(EntityTagHeaderValue.Any) || entityTag.Compare(etag, useStrongComparison))
358private static void SetLastModifiedAndEtagHeaders(HttpResponse response, DateTimeOffset? lastModified, EntityTagHeaderValue? etag)
404public static partial void IfMatchPreconditionFailed(ILogger logger, EntityTagHeaderValue currentETag);
427EntityTagHeaderValue currentETag,
428EntityTagHeaderValue IfRangeETag);
TypedResults.cs (22)
248/// This API is an alias for <see cref="Bytes(byte[], string, string?, bool, DateTimeOffset?, EntityTagHeaderValue?)"/>.</para>
255/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> associated with the file.</param>
263EntityTagHeaderValue? entityTag = null)
283/// This API is an alias for <see cref="File(byte[], string, string?, bool, DateTimeOffset?, EntityTagHeaderValue?)"/>.</para>
290/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> associated with the file.</param>
298EntityTagHeaderValue? entityTag = null)
323/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> associated with the file.</param>
331EntityTagHeaderValue? entityTag = null)
347/// This API is an alias for <see cref="Stream(Stream, string, string?, DateTimeOffset?, EntityTagHeaderValue?, bool)"/>.
358/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> to be configure the <c>ETag</c> response header
367EntityTagHeaderValue? entityTag = null,
388/// This API is an alias for <see cref="File(Stream, string, string?, DateTimeOffset?, EntityTagHeaderValue?, bool)"/>.
399/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> to be configure the <c>ETag</c> response header
408EntityTagHeaderValue? entityTag = null,
437/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> to be configure the <c>ETag</c> response header
446EntityTagHeaderValue? entityTag = null,
468/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> to be configure the <c>ETag</c> response header
476EntityTagHeaderValue? entityTag = null)
499/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> associated with the file.</param>
507EntityTagHeaderValue? entityTag = null,
532/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> associated with the file.</param>
540EntityTagHeaderValue? entityTag = null,
Microsoft.AspNetCore.Http.Results.Tests (63)
ResultsTests.cs (12)
262public void BytesOrFile_ResultHasCorrectValues(int bytesOrFile, string contentType, string fileDownloadName, bool enableRangeProcessing, DateTimeOffset lastModified, EntityTagHeaderValue entityTag)
285new object[] { 0, "text/plain", "testfile", true, new DateTimeOffset(2022, 1, 1, 0, 0, 1, TimeSpan.FromHours(-8)), EntityTagHeaderValue.Any },
286new object[] { 0, default(string), default(string), default(bool), default(DateTimeOffset?), default(EntityTagHeaderValue) },
287new object[] { 1, "text/plain", "testfile", true, new DateTimeOffset(2022, 1, 1, 0, 0, 1, TimeSpan.FromHours(-8)), EntityTagHeaderValue.Any },
288new object[] { 1, default(string), default(string), default(bool), default(DateTimeOffset?), default(EntityTagHeaderValue) }
293public void Stream_ResultHasCorrectValues(int overload, string contentType, string fileDownloadName, bool enableRangeProcessing, DateTimeOffset lastModified, EntityTagHeaderValue entityTag)
333new object[] { 0, "text/plain", "testfile", true, new DateTimeOffset(2022, 1, 1, 0, 0, 1, TimeSpan.FromHours(-8)), EntityTagHeaderValue.Any },
334new object[] { 0, default(string), default(string), default(bool), default(DateTimeOffset?), default(EntityTagHeaderValue) },
335new object[] { 1, "text/plain", "testfile", true, new DateTimeOffset(2022, 1, 1, 0, 0, 1, TimeSpan.FromHours(-8)), EntityTagHeaderValue.Any },
336new object[] { 1, default(string), default(string), default(bool), default(DateTimeOffset?), default(EntityTagHeaderValue) },
337new object[] { 2, "text/plain", "testfile", true, new DateTimeOffset(2022, 1, 1, 0, 0, 1, TimeSpan.FromHours(-8)), EntityTagHeaderValue.Any },
338new object[] { 2, default(string), default(string), default(bool), default(DateTimeOffset?), default(EntityTagHeaderValue) }
TypedResultsTests.cs (18)
240public void BytesOrFile_ResultHasCorrectValues(int bytesOrFile, string contentType, string fileDownloadName, bool enableRangeProcessing, DateTimeOffset lastModified, EntityTagHeaderValue entityTag)
263new object[] { 0, "text/plain", "testfile", true, new DateTimeOffset(2022, 1, 1, 0, 0, 1, TimeSpan.FromHours(-8)), EntityTagHeaderValue.Any },
264new object[] { 0, default(string), default(string), default(bool), default(DateTimeOffset?), default(EntityTagHeaderValue) },
265new object[] { 1, "text/plain", "testfile", true, new DateTimeOffset(2022, 1, 1, 0, 0, 1, TimeSpan.FromHours(-8)), EntityTagHeaderValue.Any },
266new object[] { 1, default(string), default(string), default(bool), default(DateTimeOffset?), default(EntityTagHeaderValue) }
271public void PhysicalFile_ResultHasCorrectValues(string contentType, string fileDownloadName, bool enableRangeProcessing, DateTimeOffset lastModified, EntityTagHeaderValue entityTag)
290public void VirtualFile_ResultHasCorrectValues(string contentType, string fileDownloadName, bool enableRangeProcessing, DateTimeOffset lastModified, EntityTagHeaderValue entityTag)
309new object[] { "text/plain", "testfile", true, new DateTimeOffset(2022, 1, 1, 0, 0, 1, TimeSpan.FromHours(-8)), EntityTagHeaderValue.Any },
310new object[] { default(string), default(string), default(bool), default(DateTimeOffset?), default(EntityTagHeaderValue) },
311new object[] { "text/plain", "testfile", true, new DateTimeOffset(2022, 1, 1, 0, 0, 1, TimeSpan.FromHours(-8)), EntityTagHeaderValue.Any },
312new object[] { default(string), default(string), default(bool), default(DateTimeOffset?), default(EntityTagHeaderValue) }
377public void Stream_ResultHasCorrectValues(int overload, string contentType, string fileDownloadName, bool enableRangeProcessing, DateTimeOffset lastModified, EntityTagHeaderValue entityTag)
417new object[] { 0, "text/plain", "testfile", true, new DateTimeOffset(2022, 1, 1, 0, 0, 1, TimeSpan.FromHours(-8)), EntityTagHeaderValue.Any },
418new object[] { 0, default(string), default(string), default(bool), default(DateTimeOffset?), default(EntityTagHeaderValue) },
419new object[] { 1, "text/plain", "testfile", true, new DateTimeOffset(2022, 1, 1, 0, 0, 1, TimeSpan.FromHours(-8)), EntityTagHeaderValue.Any },
420new object[] { 1, default(string), default(string), default(bool), default(DateTimeOffset?), default(EntityTagHeaderValue) },
421new object[] { 2, "text/plain", "testfile", true, new DateTimeOffset(2022, 1, 1, 0, 0, 1, TimeSpan.FromHours(-8)), EntityTagHeaderValue.Any },
422new object[] { 2, default(string), default(string), default(bool), default(DateTimeOffset?), default(EntityTagHeaderValue) }
Microsoft.AspNetCore.Mvc.Core (48)
ControllerBase.cs (32)
1133/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> associated with the file.</param>
1136public virtual FileContentResult File(byte[] fileContents, string contentType, DateTimeOffset? lastModified, EntityTagHeaderValue entityTag)
1154/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> associated with the file.</param>
1158public virtual FileContentResult File(byte[] fileContents, string contentType, DateTimeOffset? lastModified, EntityTagHeaderValue entityTag, bool enableRangeProcessing)
1178/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> associated with the file.</param>
1181public virtual FileContentResult File(byte[] fileContents, string contentType, string? fileDownloadName, DateTimeOffset? lastModified, EntityTagHeaderValue entityTag)
1201/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> associated with the file.</param>
1205public virtual FileContentResult File(byte[] fileContents, string contentType, string? fileDownloadName, DateTimeOffset? lastModified, EntityTagHeaderValue entityTag, bool enableRangeProcessing)
1299/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> associated with the file.</param>
1305public virtual FileStreamResult File(Stream fileStream, string contentType, DateTimeOffset? lastModified, EntityTagHeaderValue entityTag)
1323/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> associated with the file.</param>
1330public virtual FileStreamResult File(Stream fileStream, string contentType, DateTimeOffset? lastModified, EntityTagHeaderValue entityTag, bool enableRangeProcessing)
1350/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> associated with the file.</param>
1356public virtual FileStreamResult File(Stream fileStream, string contentType, string? fileDownloadName, DateTimeOffset? lastModified, EntityTagHeaderValue entityTag)
1376/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> associated with the file.</param>
1383public virtual FileStreamResult File(Stream fileStream, string contentType, string? fileDownloadName, DateTimeOffset? lastModified, EntityTagHeaderValue entityTag, bool enableRangeProcessing)
1465/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> associated with the file.</param>
1468public virtual VirtualFileResult File(string virtualPath, string contentType, DateTimeOffset? lastModified, EntityTagHeaderValue entityTag)
1486/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> associated with the file.</param>
1490public virtual VirtualFileResult File(string virtualPath, string contentType, DateTimeOffset? lastModified, EntityTagHeaderValue entityTag, bool enableRangeProcessing)
1510/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> associated with the file.</param>
1513public virtual VirtualFileResult File(string virtualPath, string contentType, string? fileDownloadName, DateTimeOffset? lastModified, EntityTagHeaderValue entityTag)
1533/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> associated with the file.</param>
1537public virtual VirtualFileResult File(string virtualPath, string contentType, string? fileDownloadName, DateTimeOffset? lastModified, EntityTagHeaderValue entityTag, bool enableRangeProcessing)
1626/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> associated with the file.</param>
1629public virtual PhysicalFileResult PhysicalFile(string physicalPath, string contentType, DateTimeOffset? lastModified, EntityTagHeaderValue entityTag)
1647/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> associated with the file.</param>
1651public virtual PhysicalFileResult PhysicalFile(string physicalPath, string contentType, DateTimeOffset? lastModified, EntityTagHeaderValue entityTag, bool enableRangeProcessing)
1671/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> associated with the file.</param>
1674public virtual PhysicalFileResult PhysicalFile(string physicalPath, string contentType, string? fileDownloadName, DateTimeOffset? lastModified, EntityTagHeaderValue entityTag)
1694/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> associated with the file.</param>
1698public virtual PhysicalFileResult PhysicalFile(string physicalPath, string contentType, string? fileDownloadName, DateTimeOffset? lastModified, EntityTagHeaderValue entityTag, bool enableRangeProcessing)
src\Shared\ResultsHelpers\FileResultHelper.cs (11)
96EntityTagHeaderValue? etag,
164EntityTagHeaderValue? etag,
197EntityTagHeaderValue? etag,
263IList<EntityTagHeaderValue> etagHeader,
264EntityTagHeaderValue etag,
271foreach (var entityTag in etagHeader)
273if (entityTag.Equals(EntityTagHeaderValue.Any) || entityTag.Compare(etag, useStrongComparison))
358private static void SetLastModifiedAndEtagHeaders(HttpResponse response, DateTimeOffset? lastModified, EntityTagHeaderValue? etag)
404public static partial void IfMatchPreconditionFailed(ILogger logger, EntityTagHeaderValue currentETag);
427EntityTagHeaderValue currentETag,
428EntityTagHeaderValue IfRangeETag);
Microsoft.AspNetCore.Mvc.Core.Test (42)
Microsoft.AspNetCore.OutputCaching (6)
Microsoft.AspNetCore.OutputCaching.Tests (7)
Microsoft.AspNetCore.ResponseCaching (6)
Microsoft.AspNetCore.ResponseCaching.Tests (7)
Microsoft.AspNetCore.StaticAssets (14)
Microsoft.AspNetCore.StaticFiles (5)
Microsoft.Net.Http.Headers (38)
Microsoft.Net.Http.Headers.Tests (71)