241 instantiations of StaticWebAssetEndpointResponseHeader
Microsoft.NET.Sdk.StaticWebAssets.Tasks (13)
ApplyCompressionNegotiation.cs (5)
89new StaticWebAssetEndpointResponseHeader 144new StaticWebAssetEndpointResponseHeader 224new() 229new() 407headers.Add(new StaticWebAssetEndpointResponseHeader
DefineStaticWebAssetEndpoints.cs (6)
130new() 135new() 140new() 145new() 157headers[4] = new() { Name = "Cache-Control", Value = "max-age=31536000, immutable" }; 164headers[4] = new() { Name = "Cache-Control", Value = !string.IsNullOrEmpty(cacheSetting) ? cacheSetting : "no-cache" };
UpdateStaticWebAssetEndpoints.cs (2)
224(name, value) => new StaticWebAssetEndpointResponseHeader { Name = name, Value = value }, 329new StaticWebAssetEndpointResponseHeader
Microsoft.NET.Sdk.StaticWebAssets.Tests (228)
StaticWebAssets\ApplyCompressionNegotiationTest.cs (166)
83new () { Name = "Content-Encoding", Value = "gzip" }, 84new () { Name = "Content-Length", Value = "9" }, 85new () { Name = "Content-Type", Value = "text/javascript" }, 86new () { Name = "Vary", Value = "Accept-Encoding" } 97new () { Name = "Content-Length", Value = "20" }, 98new () { Name = "Content-Type", Value = "text/javascript" }, 99new () { Name = "Vary", Value = "Accept-Encoding" }, 110new () { Name = "Content-Encoding", Value = "gzip" }, 111new () { Name = "Content-Length", Value = "9" }, 112new () { Name = "Content-Type", Value = "text/javascript" }, 113new () { Name = "Vary", Value = "Accept-Encoding" } 201ResponseHeaders = [ new () 206new () 211new () 216new () 221new () 226new () 231new () 267ResponseHeaders = [ new () 272new () 277new () 282new () 287new () 292new () 297new () 325ResponseHeaders = [ new () 330new () 335new () 340new () 345new () 350new () 378ResponseHeaders = [ new () 383new () 388new () 393new () 398new () 403new () 408new () 436ResponseHeaders = [ new () 441new () 446new () 451new () 456new () 461new () 466new () 502ResponseHeaders = [ new () 507new () 512new () 517new () 522new () 527new () 532new () 558ResponseHeaders = [ new () 563new () 568new () 573new () 578new () 583new () 588new () 606ResponseHeaders = [ new () 611new () 616new () 621new () 626new () 631new () 649ResponseHeaders = [ new () 654new () 659new () 664new () 669new () 674new () 679new () 697ResponseHeaders = [ new () { 701new () { 705new () { 709new () { 713new () { 717new () { 721new () { 809new () { Name = "Content-Encoding", Value = "gzip" }, 810new () { Name = "Content-Type", Value = "text/javascript" }, 811new () { Name = "Vary", Value = "Accept-Encoding" } 822new () { Name = "Content-Type", Value = "text/javascript" }, 823new () { Name = "Vary", Value = "Accept-Encoding" } 834new () { Name = "Content-Encoding", Value = "gzip" }, 835new () { Name = "Content-Type", Value = "text/javascript" }, 836new () { Name = "Vary", Value = "Accept-Encoding" } 847new () { Name = "Content-Type", Value = "text/javascript" }, 848new () { Name = "Vary", Value = "Accept-Encoding" } 859new () { Name = "Content-Encoding", Value = "gzip" }, 860new () { Name = "Content-Type", Value = "text/javascript" }, 861new () { Name = "Vary", Value = "Accept-Encoding" } 914new () { Name = "Content-Encoding", Value = "gzip" }, 915new (){ Name = "Content-Type", Value = "text/javascript" }, 916new (){ Name = "Vary", Value = "Accept-Encoding" } 927new (){ Name = "Content-Type", Value = "text/javascript" } 938new (){ Name = "Content-Encoding", Value = "gzip" }, 939new (){ Name = "Content-Type", Value = "text/javascript" }, 940new (){ Name = "Vary", Value = "Accept-Encoding" } 951new () { Name = "Content-Type", Value = "text/javascript" } 962new () { Name = "Content-Encoding", Value = "gzip" }, 963new () { Name = "Content-Type", Value = "text/javascript" }, 964new () { Name = "Vary", Value = "Accept-Encoding" } 985new () { Name = "Content-Encoding", Value = "gzip" }, 986new () { Name = "Content-Type", Value = "text/javascript" }, 987new () { Name = "Vary", Value = "Accept-Encoding" } 998new () { Name = "Content-Type", Value = "text/javascript" }, 999new () { Name = "Vary", Value = "Accept-Encoding" } 1010new () { Name = "Content-Encoding", Value = "gzip" }, 1011new () { Name = "Content-Type", Value = "text/javascript" }, 1012new () { Name = "Vary", Value = "Accept-Encoding" } 1023new () { Name = "Content-Type", Value = "text/javascript" }, 1024new () { Name = "Vary", Value = "Accept-Encoding" } 1035new () { Name = "Content-Encoding", Value = "gzip" }, 1036new () { Name = "Content-Type", Value = "text/javascript" }, 1037new () { Name = "Vary", Value = "Accept-Encoding" } 1106new () { Name = "Content-Encoding", Value = "gzip" }, 1107new (){ Name = "Content-Type", Value = "text/javascript" }, 1108new (){ Name = "Vary", Value = "Accept-Encoding" } 1119new (){ Name = "Content-Type", Value = "text/javascript" } 1130new (){ Name = "Content-Encoding", Value = "gzip" }, 1131new (){ Name = "Content-Type", Value = "text/javascript" }, 1132new (){ Name = "Vary", Value = "Accept-Encoding" } 1143new () { Name = "Content-Type", Value = "text/javascript" } 1154new () { Name = "Content-Encoding", Value = "gzip" }, 1155new () { Name = "Content-Type", Value = "text/javascript" }, 1156new () { Name = "Vary", Value = "Accept-Encoding" } 1167new () { Name = "Content-Type", Value = "text/javascript" }, 1188new () { Name = "Content-Encoding", Value = "gzip" }, 1189new () { Name = "Content-Type", Value = "text/javascript" }, 1190new () { Name = "Vary", Value = "Accept-Encoding" } 1201new () { Name = "Content-Encoding", Value = "br" }, 1202new () { Name = "Content-Type", Value = "text/javascript" }, 1203new () { Name = "Vary", Value = "Accept-Encoding" } 1214new () { Name = "Content-Type", Value = "text/javascript" }, 1215new () { Name = "Vary", Value = "Accept-Encoding" } 1226new () { Name = "Content-Encoding", Value = "gzip" }, 1227new () { Name = "Content-Type", Value = "text/javascript" }, 1228new () { Name = "Vary", Value = "Accept-Encoding" } 1239new () { Name = "Content-Encoding", Value = "br" }, 1240new () { Name = "Content-Type", Value = "text/javascript" }, 1241new () { Name = "Vary", Value = "Accept-Encoding" } 1252new () { Name = "Content-Type", Value = "text/javascript" }, 1253new () { Name = "Vary", Value = "Accept-Encoding" } 1264new () { Name = "Content-Encoding", Value = "gzip" }, 1265new () { Name = "Content-Type", Value = "text/javascript" }, 1266new () { Name = "Vary", Value = "Accept-Encoding" } 1277new () { Name = "Content-Encoding", Value = "br" }, 1278new () { Name = "Content-Type", Value = "text/javascript" }, 1279new () { Name = "Vary", Value = "Accept-Encoding" } 1372new () { Name = "Content-Encoding", Value = "gzip" }, 1373new () { Name = "Content-Length", Value = "9" }, 1374new () { Name = "Content-Type", Value = "text/javascript" }, 1375new () { Name = "Vary", Value = "Accept-Encoding" } 1386new () { Name = "Content-Length", Value = "20" }, 1387new () { Name = "Content-Type", Value = "text/javascript" }, 1388new () { Name = "Vary", Value = "Accept-Encoding" }, 1399new () { Name = "Content-Encoding", Value = "gzip" }, 1400new () { Name = "Content-Length", Value = "9" }, 1401new () { Name = "Content-Type", Value = "text/javascript" }, 1402new () { Name = "Vary", Value = "Accept-Encoding" } 1413new () { Name = "Content-Length", Value = "18" }, 1414new () { Name = "Content-Type", Value = "text/javascript" }, 1415new () { Name = "Vary", Value = "Accept-Encoding" }, 1427new StaticWebAssetEndpointResponseHeader { 1431..(AdditionalHeaders ?? []).Select(h => new StaticWebAssetEndpointResponseHeader { Name = h.name, Value = h.value })
StaticWebAssets\DefineStaticWebAssetEndpointsTest.cs (34)
61new StaticWebAssetEndpointResponseHeader 66new StaticWebAssetEndpointResponseHeader 71new StaticWebAssetEndpointResponseHeader 76new StaticWebAssetEndpointResponseHeader 81new StaticWebAssetEndpointResponseHeader 146new StaticWebAssetEndpointResponseHeader 151new StaticWebAssetEndpointResponseHeader 156new StaticWebAssetEndpointResponseHeader 161new StaticWebAssetEndpointResponseHeader 166new StaticWebAssetEndpointResponseHeader 178new StaticWebAssetEndpointResponseHeader 183new StaticWebAssetEndpointResponseHeader 188new StaticWebAssetEndpointResponseHeader 193new StaticWebAssetEndpointResponseHeader 198new StaticWebAssetEndpointResponseHeader 263new StaticWebAssetEndpointResponseHeader 268new StaticWebAssetEndpointResponseHeader 273new StaticWebAssetEndpointResponseHeader 278new StaticWebAssetEndpointResponseHeader 283new StaticWebAssetEndpointResponseHeader 295new StaticWebAssetEndpointResponseHeader 300new StaticWebAssetEndpointResponseHeader 305new StaticWebAssetEndpointResponseHeader 310new StaticWebAssetEndpointResponseHeader 315new StaticWebAssetEndpointResponseHeader 334new() { 338new() { 342new() { 346new() { 557new StaticWebAssetEndpointResponseHeader 562new StaticWebAssetEndpointResponseHeader 567new StaticWebAssetEndpointResponseHeader 572new StaticWebAssetEndpointResponseHeader 577new StaticWebAssetEndpointResponseHeader
StaticWebAssets\GenerateStaticWebAssetEndpointsManifestTest.cs (20)
27new() { 31new() { 35new() { 39new() { 43new() { 70new() { 74new() { 78new() { 82new() { 86new() { 113new() { 117new() { 121new() { 125new() { 129new() { 146new() { 150new() { 154new() { 158new() { 162new() {
StaticWebAssets\GenerateStaticWebAssetEndpointsPropsFileTest.cs (2)
59new StaticWebAssetEndpointResponseHeader 129new StaticWebAssetEndpointResponseHeader
StaticWebAssets\GenerateStaticWebAssetsManifestTest.cs (4)
120new() 125new() 130new() 135new()
StaticWebAssets\UpdateStaticWebAssetEndpointsTest.cs (2)
119endpoint.ResponseHeaders = [.. endpoint.ResponseHeaders, new StaticWebAssetEndpointResponseHeader { Name = "ETag", Value = "W/\"integrity\"" }]; 164endpoint.ResponseHeaders = [.. endpoint.ResponseHeaders, new StaticWebAssetEndpointResponseHeader { Name = "ETag", Value = "W/\"integrity\"" }];
51 references to StaticWebAssetEndpointResponseHeader
Microsoft.NET.Sdk.BlazorWebAssembly.Tests (7)
StaticWebAssetsBaselineComparer.cs (6)
450StaticWebAssetEndpointResponseHeader[] manifestResponseHeaders, 451StaticWebAssetEndpointResponseHeader[] expectedResponseHeaders) 458var manifest = new HashSet<StaticWebAssetEndpointResponseHeader>(manifestResponseHeaders); 459var differences = new HashSet<StaticWebAssetEndpointResponseHeader>(manifestResponseHeaders); 460var expected = new HashSet<StaticWebAssetEndpointResponseHeader>(expectedResponseHeaders); 463foreach (var difference in differences)
StaticWebAssetsBaselineFactory.cs (1)
120ref var header = ref endpoint.ResponseHeaders[i];
Microsoft.NET.Sdk.StaticWebAssets.Tasks (30)
ApplyCompressionNegotiation.cs (13)
32var compressionHeadersByEncoding = new Dictionary<string, StaticWebAssetEndpointResponseHeader[]>(2); 167var header = endpoint.ResponseHeaders[i]; 183var responseHeader = compressedEndpoint.ResponseHeaders[i]; 211private static StaticWebAssetEndpointResponseHeader[] GetOrCreateCompressionHeaders(Dictionary<string, StaticWebAssetEndpointResponseHeader[]> compressionHeadersByEncoding, StaticWebAsset compressedAsset) 222private static StaticWebAssetEndpointResponseHeader[] CreateCompressionHeaders(StaticWebAsset compressedAsset) => 257foreach (var header in relatedEndpointCandidate.ResponseHeaders) 282var headers = new List<StaticWebAssetEndpointResponseHeader>(7); 296var responseHeader = compressedEndpoint.ResponseHeaders[i]; 368private void ApplyCompressedEndpointHeaders(List<StaticWebAssetEndpointResponseHeader> headers, StaticWebAssetEndpoint compressedEndpoint, string relatedEndpointCandidateRoute) 370foreach (var header in compressedEndpoint.ResponseHeaders) 386private void ApplyRelatedEndpointCandidateHeaders(List<StaticWebAssetEndpointResponseHeader> headers, StaticWebAssetEndpoint relatedEndpointCandidate, HashSet<string> compressedHeaders) 388foreach (var header in relatedEndpointCandidate.ResponseHeaders)
Data\StaticWebAssetEndpoint.cs (6)
18private StaticWebAssetEndpointResponseHeader[] _responseHeaders; 100public StaticWebAssetEndpointResponseHeader[] ResponseHeaders 104_responseHeaders ??= StaticWebAssetEndpointResponseHeader.FromMetadataValue(ResponseHeadersString); 458nameof(ResponseHeaders) => !_responseHeadersModified ? ResponseHeadersString ?? "" : StaticWebAssetEndpointResponseHeader.ToMetadataValue(ResponseHeaders), 501{ nameof(ResponseHeaders), !_responseHeadersModified ? ResponseHeadersString ?? "" : StaticWebAssetEndpointResponseHeader.ToMetadataValue(ResponseHeaders) }, 526destinationItem.SetMetadata(nameof(ResponseHeaders), !_responseHeadersModified ? ResponseHeadersString ?? "" : StaticWebAssetEndpointResponseHeader.ToMetadataValue(ResponseHeaders));
Data\StaticWebAssetEndpointResponseHeader.cs (8)
13public struct StaticWebAssetEndpointResponseHeader : IEquatable<StaticWebAssetEndpointResponseHeader>, IComparable<StaticWebAssetEndpointResponseHeader> 15private static readonly JsonTypeInfo<StaticWebAssetEndpointResponseHeader[]> _jsonTypeInfo = 22internal static StaticWebAssetEndpointResponseHeader[] FromMetadataValue(string value) => string.IsNullOrEmpty(value) ? [] : JsonSerializer.Deserialize(value, _jsonTypeInfo); 24internal static string ToMetadataValue(StaticWebAssetEndpointResponseHeader[] responseHeaders) => 31public override bool Equals(object obj) => obj is StaticWebAssetEndpointResponseHeader responseHeader && 34public bool Equals(StaticWebAssetEndpointResponseHeader other) => string.Equals(Name, other.Name, StringComparison.Ordinal) && 49public int CompareTo(StaticWebAssetEndpointResponseHeader other) => string.CompareOrdinal(Name, other.Name) switch
DefineStaticWebAssetEndpoints.cs (1)
128var headers = new StaticWebAssetEndpointResponseHeader[5]
FilterStaticWebAssetEndpoints.cs (1)
121var header = endpoint.ResponseHeaders[j];
GenerateStaticWebAssetEndpointsPropsFile.cs (1)
59new XElement(nameof(StaticWebAssetEndpoint.ResponseHeaders), new XCData(StaticWebAssetEndpointResponseHeader.ToMetadataValue(element.ResponseHeaders)))));
Microsoft.NET.Sdk.StaticWebAssets.Tests (14)
StaticWebAssetEndpointsIntegrationTest.cs (2)
197var contentLength = endpoint.ResponseHeaders.Single(rh => rh.Name == "Content-Length"); 229var eTagHeader = uncompressedAppJsEndpoint.Single().ResponseHeaders.Single(h => h.Name == "ETag");
StaticWebAssets\ApplyCompressionNegotiationTest.cs (2)
1423private static StaticWebAssetEndpointResponseHeader[] CreateHeaders(string contentType, params (string name, string value)[] AdditionalHeaders) 1484StaticWebAssetEndpointResponseHeader[] responseHeaders = null,
StaticWebAssets\DefineStaticWebAssetEndpointsTest.cs (2)
332var headers = new StaticWebAssetEndpointResponseHeader[] 640StaticWebAssetEndpointResponseHeader[] responseHeaders = null,
StaticWebAssets\GenerateStaticWebAssetEndpointsPropsFileTest.cs (1)
204StaticWebAssetEndpointResponseHeader[] responseHeaders = null,
StaticWebAssetsBaselineComparer.cs (6)
450StaticWebAssetEndpointResponseHeader[] manifestResponseHeaders, 451StaticWebAssetEndpointResponseHeader[] expectedResponseHeaders) 458var manifest = new HashSet<StaticWebAssetEndpointResponseHeader>(manifestResponseHeaders); 459var differences = new HashSet<StaticWebAssetEndpointResponseHeader>(manifestResponseHeaders); 460var expected = new HashSet<StaticWebAssetEndpointResponseHeader>(expectedResponseHeaders); 463foreach (var difference in differences)
StaticWebAssetsBaselineFactory.cs (1)
120ref var header = ref endpoint.ResponseHeaders[i];