221 references to EntityTagHeaderValue
FilesWebSite (5)
Controllers\DownloadFilesController.cs (4)
31var entityTag = new EntityTagHeaderValue("\"Etag\""); 45var entityTag = new EntityTagHeaderValue("\"Etag\""); 93var entityTag = new EntityTagHeaderValue("\"Etag\""); 112var entityTag = new EntityTagHeaderValue("\"Etag\"");
Controllers\EmbeddedFilesController.cs (1)
40file.EntityTag = new Microsoft.Net.Http.Headers.EntityTagHeaderValue("\"Etag\"");
Microsoft.AspNetCore.Http.Extensions.Tests (1)
HeaderDictionaryTypeExtensionsTest.cs (1)
99var expected = new EntityTagHeaderValue("\"123\"");
Microsoft.AspNetCore.Http.Results.Tests (47)
HttpFileStreamResultTests.cs (1)
66var entityTag = new EntityTagHeaderValue("\"Etag\"");
PushStreamResultTests.cs (1)
54var entityTag = new EntityTagHeaderValue("\"Etag\"");
src\Shared\ResultsTests\FileContentResultTestBase.cs (16)
58var entityTag = new EntityTagHeaderValue("\"Etag\""); 66new EntityTagHeaderValue("\"Etag\""), 97var entityTag = new EntityTagHeaderValue("\"Etag\""); 104new EntityTagHeaderValue("\"Etag\""), 136var entityTag = new EntityTagHeaderValue("\"Etag\""); 143new EntityTagHeaderValue("\"Etag\""), 146requestHeaders.IfRange = new RangeConditionHeaderValue(new EntityTagHeaderValue("\"Etag\"")); 170var entityTag = new EntityTagHeaderValue("\"Etag\""); 177new EntityTagHeaderValue("\"Etag\""), 180requestHeaders.IfRange = new RangeConditionHeaderValue(new EntityTagHeaderValue("\"NotEtag\"")); 207var entityTag = new EntityTagHeaderValue("\"Etag\""); 238var entityTag = new EntityTagHeaderValue("\"Etag\""); 270var entityTag = new EntityTagHeaderValue("\"Etag\""); 277new EntityTagHeaderValue("\"NotEtag\""), 304var entityTag = new EntityTagHeaderValue("\"Etag\""); 311new EntityTagHeaderValue("\"Etag\""),
src\Shared\ResultsTests\FileStreamResultTestBase.cs (17)
34var entityTag = new EntityTagHeaderValue("\"Etag\""); 44new EntityTagHeaderValue("\"Etag\""), 76var entityTag = new EntityTagHeaderValue("\"Etag\""); 85new EntityTagHeaderValue("\"Etag\""), 88requestHeaders.IfRange = new RangeConditionHeaderValue(new EntityTagHeaderValue("\"Etag\"")); 117var entityTag = new EntityTagHeaderValue("\"Etag\""); 126new EntityTagHeaderValue("\"Etag\""), 154var entityTag = new EntityTagHeaderValue("\"Etag\""); 163new EntityTagHeaderValue("\"Etag\""), 194var entityTag = new EntityTagHeaderValue("\"Etag\""); 227var entityTag = new EntityTagHeaderValue("\"Etag\""); 261var entityTag = new EntityTagHeaderValue("\"Etag\""); 269new EntityTagHeaderValue("\"NotEtag\""), 297var entityTag = new EntityTagHeaderValue("\"Etag\""); 305new EntityTagHeaderValue("\"Etag\""), 336var entityTag = new EntityTagHeaderValue("\"Etag\""); 347new EntityTagHeaderValue("\"Etag\""),
src\Shared\ResultsTests\PhysicalFileResultTestBase.cs (6)
70var entityTag = new EntityTagHeaderValue("\"Etag\""); 77requestHeaders.IfRange = new RangeConditionHeaderValue(new EntityTagHeaderValue("\"Etag\"")); 102var entityTag = new EntityTagHeaderValue("\"Etag\""); 109requestHeaders.IfRange = new RangeConditionHeaderValue(new EntityTagHeaderValue("\"Etag\"")); 129var entityTag = new EntityTagHeaderValue("\"Etag\""); 136requestHeaders.IfRange = new RangeConditionHeaderValue(new EntityTagHeaderValue("\"NotEtag\""));
src\Shared\ResultsTests\VirtualFileResultTestBase.cs (6)
91var entityTag = new EntityTagHeaderValue("\"Etag\""); 95requestHeaders.IfRange = new RangeConditionHeaderValue(new EntityTagHeaderValue("\"Etag\"")); 128var entityTag = new EntityTagHeaderValue("\"Etag\""); 132requestHeaders.IfRange = new RangeConditionHeaderValue(new EntityTagHeaderValue("\"Etag\"")); 161var entityTag = new EntityTagHeaderValue("\"Etag\""); 165requestHeaders.IfRange = new RangeConditionHeaderValue(new EntityTagHeaderValue("\"NotEtag\""));
Microsoft.AspNetCore.Mvc.Core.Test (59)
ControllerBaseTest.cs (6)
1709var entityTag = (entityTagString == null) ? null : new EntityTagHeaderValue(entityTagString); 1753var entityTag = (entityTagString == null) ? null : new EntityTagHeaderValue(entityTagString); 1797var entityTag = (entityTagString == null) ? null : new EntityTagHeaderValue(entityTagString); 1841var entityTag = (entityTagString == null) ? null : new EntityTagHeaderValue(entityTagString); 1895var entityTag = (entityTagString == null) ? null : new EntityTagHeaderValue(entityTagString); 1947var entityTag = (entityTagString == null) ? null : new EntityTagHeaderValue(entityTagString);
FileResultHelperTest.cs (7)
252var etag = new EntityTagHeaderValue("\"Etag\""); 255new EntityTagHeaderValue(ifMatch), 292var etag = new EntityTagHeaderValue("\"Etag\""); 295new EntityTagHeaderValue(ifMatch), 330var etag = new EntityTagHeaderValue("\"Etag\""); 333new EntityTagHeaderValue(ifMatch), 366var etag = new EntityTagHeaderValue("\"Etag\"");
FileStreamResultTest.cs (1)
77var entityTag = new EntityTagHeaderValue("\"Etag\"");
src\Shared\ResultsTests\FileContentResultTestBase.cs (16)
58var entityTag = new EntityTagHeaderValue("\"Etag\""); 66new EntityTagHeaderValue("\"Etag\""), 97var entityTag = new EntityTagHeaderValue("\"Etag\""); 104new EntityTagHeaderValue("\"Etag\""), 136var entityTag = new EntityTagHeaderValue("\"Etag\""); 143new EntityTagHeaderValue("\"Etag\""), 146requestHeaders.IfRange = new RangeConditionHeaderValue(new EntityTagHeaderValue("\"Etag\"")); 170var entityTag = new EntityTagHeaderValue("\"Etag\""); 177new EntityTagHeaderValue("\"Etag\""), 180requestHeaders.IfRange = new RangeConditionHeaderValue(new EntityTagHeaderValue("\"NotEtag\"")); 207var entityTag = new EntityTagHeaderValue("\"Etag\""); 238var entityTag = new EntityTagHeaderValue("\"Etag\""); 270var entityTag = new EntityTagHeaderValue("\"Etag\""); 277new EntityTagHeaderValue("\"NotEtag\""), 304var entityTag = new EntityTagHeaderValue("\"Etag\""); 311new EntityTagHeaderValue("\"Etag\""),
src\Shared\ResultsTests\FileStreamResultTestBase.cs (17)
34var entityTag = new EntityTagHeaderValue("\"Etag\""); 44new EntityTagHeaderValue("\"Etag\""), 76var entityTag = new EntityTagHeaderValue("\"Etag\""); 85new EntityTagHeaderValue("\"Etag\""), 88requestHeaders.IfRange = new RangeConditionHeaderValue(new EntityTagHeaderValue("\"Etag\"")); 117var entityTag = new EntityTagHeaderValue("\"Etag\""); 126new EntityTagHeaderValue("\"Etag\""), 154var entityTag = new EntityTagHeaderValue("\"Etag\""); 163new EntityTagHeaderValue("\"Etag\""), 194var entityTag = new EntityTagHeaderValue("\"Etag\""); 227var entityTag = new EntityTagHeaderValue("\"Etag\""); 261var entityTag = new EntityTagHeaderValue("\"Etag\""); 269new EntityTagHeaderValue("\"NotEtag\""), 297var entityTag = new EntityTagHeaderValue("\"Etag\""); 305new EntityTagHeaderValue("\"Etag\""), 336var entityTag = new EntityTagHeaderValue("\"Etag\""); 347new EntityTagHeaderValue("\"Etag\""),
src\Shared\ResultsTests\PhysicalFileResultTestBase.cs (6)
70var entityTag = new EntityTagHeaderValue("\"Etag\""); 77requestHeaders.IfRange = new RangeConditionHeaderValue(new EntityTagHeaderValue("\"Etag\"")); 102var entityTag = new EntityTagHeaderValue("\"Etag\""); 109requestHeaders.IfRange = new RangeConditionHeaderValue(new EntityTagHeaderValue("\"Etag\"")); 129var entityTag = new EntityTagHeaderValue("\"Etag\""); 136requestHeaders.IfRange = new RangeConditionHeaderValue(new EntityTagHeaderValue("\"NotEtag\""));
src\Shared\ResultsTests\VirtualFileResultTestBase.cs (6)
91var entityTag = new EntityTagHeaderValue("\"Etag\""); 95requestHeaders.IfRange = new RangeConditionHeaderValue(new EntityTagHeaderValue("\"Etag\"")); 128var entityTag = new EntityTagHeaderValue("\"Etag\""); 132requestHeaders.IfRange = new RangeConditionHeaderValue(new EntityTagHeaderValue("\"Etag\"")); 161var entityTag = new EntityTagHeaderValue("\"Etag\""); 165requestHeaders.IfRange = new RangeConditionHeaderValue(new EntityTagHeaderValue("\"NotEtag\""));
Microsoft.AspNetCore.OutputCaching.Tests (7)
OutputCacheMiddlewareTests.cs (4)
309{ new EntityTagHeaderValue("\"tag\""), new EntityTagHeaderValue("\"tag\"") }, 310{ new EntityTagHeaderValue("\"tag\"", true), new EntityTagHeaderValue("\"tag\"") }, 311{ new EntityTagHeaderValue("\"tag\""), new EntityTagHeaderValue("\"tag\"", true) },
OutputCacheTests.cs (3)
697context.Response.GetTypedHeaders().ETag = new EntityTagHeaderValue("\"E1\""); 746context.Response.GetTypedHeaders().ETag = new EntityTagHeaderValue("\"E1\""); 772var builders = TestUtils.CreateBuildersWithOutputCaching(contextAction: context => context.Response.GetTypedHeaders().ETag = new EntityTagHeaderValue("\"E1\""));
Microsoft.AspNetCore.ResponseCaching.Tests (7)
ResponseCachingMiddlewareTests.cs (4)
306{ new EntityTagHeaderValue("\"tag\""), new EntityTagHeaderValue("\"tag\"") }, 307{ new EntityTagHeaderValue("\"tag\"", true), new EntityTagHeaderValue("\"tag\"") }, 308{ new EntityTagHeaderValue("\"tag\""), new EntityTagHeaderValue("\"tag\"", true) },
ResponseCachingTests.cs (3)
643context.Response.GetTypedHeaders().ETag = new EntityTagHeaderValue("\"E1\""); 696context.Response.GetTypedHeaders().ETag = new EntityTagHeaderValue("\"E1\""); 724var builders = TestUtils.CreateBuildersWithResponseCaching(contextAction: context => context.Response.GetTypedHeaders().ETag = new EntityTagHeaderValue("\"E1\""));
Microsoft.AspNetCore.StaticFiles (1)
StaticFileContext.cs (1)
127_etag = new EntityTagHeaderValue('\"' + Convert.ToString(etagHash, 16) + '\"');
Microsoft.Net.Http.Headers (1)
RangeConditionHeaderValue.cs (1)
51: this(new EntityTagHeaderValue(entityTag))
Microsoft.Net.Http.Headers.Tests (93)
EntityTagHeaderValueTest.cs (85)
11Assert.Throws<ArgumentException>(() => new EntityTagHeaderValue(null)); 13Assert.Throws<ArgumentException>(() => new EntityTagHeaderValue(string.Empty)); 34var etag = new EntityTagHeaderValue("\"tag\""); 50var etag = new EntityTagHeaderValue("\"e tag\""); 63var etag1 = new EntityTagHeaderValue("\"tag\""); 64var etag2 = new EntityTagHeaderValue("\"TAG\""); 66var etag4 = new EntityTagHeaderValue("\"tag1\""); 67var etag5 = new EntityTagHeaderValue("\"tag\""); 80var etag1 = new EntityTagHeaderValue("\"tag\""); 81var etag2 = new EntityTagHeaderValue("\"TAG\""); 83var etag4 = new EntityTagHeaderValue("\"tag1\""); 84var etag5 = new EntityTagHeaderValue("\"tag\""); 110{ new EntityTagHeaderValue("\"tag\""), new EntityTagHeaderValue("\"TAG\"") }, 112{ new EntityTagHeaderValue("\"tag\""), new EntityTagHeaderValue("\"tag\"", true) }, 113{ new EntityTagHeaderValue("\"tag\""), new EntityTagHeaderValue("\"tag1\"") }, 114{ new EntityTagHeaderValue("\"tag\""), EntityTagHeaderValue.Any }, 133{ new EntityTagHeaderValue("\"tag\""), new EntityTagHeaderValue("\"tag\"") }, 152{ new EntityTagHeaderValue("\"tag\""), new EntityTagHeaderValue("\"TAG\"") }, 153{ new EntityTagHeaderValue("\"tag\""), new EntityTagHeaderValue("\"tag1\"") }, 154{ new EntityTagHeaderValue("\"tag\""), EntityTagHeaderValue.Any }, 173{ new EntityTagHeaderValue("\"tag\""), new EntityTagHeaderValue("\"tag\"") }, 175{ new EntityTagHeaderValue("\"tag\""), new EntityTagHeaderValue("\"tag\"", true) }, 191CheckValidParse("\"tag\"", new EntityTagHeaderValue("\"tag\"")); 192CheckValidParse(" \"tag\" ", new EntityTagHeaderValue("\"tag\"")); 193CheckValidParse("\r\n \"tag\"\r\n ", new EntityTagHeaderValue("\"tag\"")); 194CheckValidParse("\"tag\"", new EntityTagHeaderValue("\"tag\"")); 195CheckValidParse("\"tag会\"", new EntityTagHeaderValue("\"tag会\"")); 197CheckValidParse("*", new EntityTagHeaderValue("*")); 220CheckValidTryParse("\"tag\"", new EntityTagHeaderValue("\"tag\"")); 221CheckValidTryParse(" \"tag\" ", new EntityTagHeaderValue("\"tag\"")); 222CheckValidTryParse("\r\n \"tag\"\r\n ", new EntityTagHeaderValue("\"tag\"")); 223CheckValidTryParse("\"tag\"", new EntityTagHeaderValue("\"tag\"")); 224CheckValidTryParse("\"tag会\"", new EntityTagHeaderValue("\"tag会\"")); 226CheckValidTryParse("*", new EntityTagHeaderValue("*")); 286new EntityTagHeaderValue("\"tag\""), 287new EntityTagHeaderValue("\"tag\""), 288new EntityTagHeaderValue("\"tag\""), 289new EntityTagHeaderValue("\"tag会\""), 290new EntityTagHeaderValue("\"tag\""), 291new EntityTagHeaderValue("\"tag\""), 292new EntityTagHeaderValue("\"tag\""), 293new EntityTagHeaderValue("\"tag\""), 319new EntityTagHeaderValue("\"tag\""), 320new EntityTagHeaderValue("\"tag\""), 321new EntityTagHeaderValue("\"tag\""), 322new EntityTagHeaderValue("\"tag会\""), 323new EntityTagHeaderValue("\"tag\""), 324new EntityTagHeaderValue("\"tag\""), 325new EntityTagHeaderValue("\"tag\""), 326new EntityTagHeaderValue("\"tag\""), 351new EntityTagHeaderValue("\"tag\""), 352new EntityTagHeaderValue("\"tag\""), 353new EntityTagHeaderValue("\"tag\""), 354new EntityTagHeaderValue("\"tag会\""), 355new EntityTagHeaderValue("\"tag\""), 356new EntityTagHeaderValue("\"tag\""), 357new EntityTagHeaderValue("\"tag\""), 358new EntityTagHeaderValue("\"tag\""), 383new EntityTagHeaderValue("\"tag\""), 384new EntityTagHeaderValue("\"tag\""), 385new EntityTagHeaderValue("\"tag\""), 386new EntityTagHeaderValue("\"tag会\""), 387new EntityTagHeaderValue("\"tag\""), 388new EntityTagHeaderValue("\"tag\""), 389new EntityTagHeaderValue("\"tag\""), 390new EntityTagHeaderValue("\"tag\""), 415new EntityTagHeaderValue("\"tag\""), 416new EntityTagHeaderValue("\"tag\""), 417new EntityTagHeaderValue("\"tag\""), 418new EntityTagHeaderValue("\"tag会\""), 419new EntityTagHeaderValue("\"tag\""), 420new EntityTagHeaderValue("\"tag\""), 463new EntityTagHeaderValue("\"tag\""), 464new EntityTagHeaderValue("\"tag\""), 465new EntityTagHeaderValue("\"tag\""), 466new EntityTagHeaderValue("\"tag会\""), 467new EntityTagHeaderValue("\"tag\""), 468new EntityTagHeaderValue("\"tag\""), 518Assert.Throws<FormatException>(() => new EntityTagHeaderValue(tag));
RangeConditionHeaderValueTest.cs (8)
11var rangeCondition = new RangeConditionHeaderValue(new EntityTagHeaderValue("\"x\"")); 12Assert.Equal(new EntityTagHeaderValue("\"x\""), rangeCondition.EntityTag); 23Assert.Equal(new EntityTagHeaderValue("\"y\""), rangeCondition.EntityTag); 41var rangeCondition = new RangeConditionHeaderValue(new EntityTagHeaderValue("\"x\"")); 52var rangeCondition2 = new RangeConditionHeaderValue(new EntityTagHeaderValue("\"x\"")); 73var rangeCondition2 = new RangeConditionHeaderValue(new EntityTagHeaderValue("\"x\"")); 102CheckValidParse("\"tag\"", new RangeConditionHeaderValue(new EntityTagHeaderValue("\"tag\""))); 131CheckValidTryParse("\"tag\"", new RangeConditionHeaderValue(new EntityTagHeaderValue("\"tag\"")));