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