249 writes to Value
Microsoft.NET.Sdk.BlazorWebAssembly.Tests (4)
StaticWebAssetsBaselineFactory.cs (4)
124header.Value = "__content-length__"; 127header.Value = "__etag__"; 130header.Value = "__last-modified__"; 142header.Value = string.Join(", ", cleaned);
Microsoft.NET.Sdk.StaticWebAssets.Tasks (13)
ApplyCompressionNegotiation.cs (5)
92Value = "Accept-Encoding" 147Value = "Accept-Encoding" 227Value = compressedAsset.AssetTraitValue 232Value = "Accept-Encoding" 410Value = $"W/{header.Value}"
DefineStaticWebAssetEndpoints.cs (6)
133Value = length, 138Value = mimeType, 143Value = $"\"{asset.Integrity}\"", 148Value = lastModified, 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 }, 332Value = operation.Value
Microsoft.NET.Sdk.StaticWebAssets.Tests (232)
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" } 204Value = "max-age=31536000, immutable" 209Value = "br" 214Value = "7" 219Value = "text/javascript" 224Value = "\u0022compressed-brotli\u0022" 229Value = now.ToString("ddd, dd MMM yyyy HH:mm:ss 'GMT'", CultureInfo.InvariantCulture) 234Value = "Accept-Encoding" 270Value = "max-age=31536000, immutable" 275Value = "gzip" 280Value = "9" 285Value = "text/javascript" 290Value = "\u0022compressed-gzip\u0022" 295Value = now.ToString("ddd, dd MMM yyyy HH:mm:ss 'GMT'", CultureInfo.InvariantCulture) 300Value = "Accept-Encoding" 328Value = "max-age=31536000, immutable" 333Value = "20" 338Value = "text/javascript" 343Value = "\u0022original\u0022" 348Value = now.ToString("ddd, dd MMM yyyy HH:mm:ss 'GMT'", CultureInfo.InvariantCulture) 353Value = "Accept-Encoding" 381Value = "max-age=31536000, immutable" 386Value = "br" 391Value = "7" 396Value = "text/javascript" 401Value = "\u0022compressed-brotli\u0022" 406Value = now.ToString("ddd, dd MMM yyyy HH:mm:ss 'GMT'", CultureInfo.InvariantCulture) 411Value = "Accept-Encoding" 439Value = "max-age=31536000, immutable" 444Value = "gzip" 449Value = "9" 454Value = "text/javascript" 459Value = "\u0022compressed-gzip\u0022" 464Value = now.ToString("ddd, dd MMM yyyy HH:mm:ss 'GMT'", CultureInfo.InvariantCulture) 469Value = "Accept-Encoding" 505Value = "no-cache" 510Value = "br" 515Value = "7" 520Value = "text/javascript" 525Value = "\u0022compressed-brotli\u0022" 530Value = now.ToString("ddd, dd MMM yyyy HH:mm:ss 'GMT'", CultureInfo.InvariantCulture) 535Value = "Accept-Encoding" 561Value = "no-cache" 566Value = "gzip" 571Value = "9" 576Value = "text/javascript" 581Value = "\u0022compressed-gzip\u0022" 586Value = now.ToString("ddd, dd MMM yyyy HH:mm:ss 'GMT'", CultureInfo.InvariantCulture) 591Value = "Accept-Encoding" 609Value = "no-cache" 614Value = "20" 619Value = "text/javascript" 624Value = "\u0022original\u0022" 629Value = now.ToString("ddd, dd MMM yyyy HH:mm:ss 'GMT'", CultureInfo.InvariantCulture) 634Value = "Accept-Encoding" 652Value = "no-cache" 657Value = "br" 662Value = "7" 667Value = "text/javascript" 672Value = "\u0022compressed-brotli\u0022" 677Value = now.ToString("ddd, dd MMM yyyy HH:mm:ss 'GMT'", CultureInfo.InvariantCulture) 682Value = "Accept-Encoding" 699Value = "no-cache" 703Value = "gzip" 707Value = "9" 711Value = "text/javascript" 715Value = "\u0022compressed-gzip\u0022" 719Value = now.ToString("ddd, dd MMM yyyy HH:mm:ss 'GMT'", CultureInfo.InvariantCulture) 723Value = "Accept-Encoding" 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" }, 1429Value = contentType 1431..(AdditionalHeaders ?? []).Select(h => new StaticWebAssetEndpointResponseHeader { Name = h.name, Value = h.value })
StaticWebAssets\DefineStaticWebAssetEndpointsTest.cs (34)
64Value = "no-cache" 69Value = "10" 74Value = "text/javascript" 79Value = "\"integrity\"" 84Value = "Thu, 15 Nov 1990 00:00:00 GMT" 149Value = "10" 154Value = "text/javascript" 159Value = "\"asdf1234\"" 164Value = "Thu, 15 Nov 1990 00:00:00 GMT" 169Value = "max-age=31536000, immutable" 181Value = "no-cache" 186Value = "10" 191Value = "text/javascript" 196Value = "\"asdf1234\"" 201Value = "Thu, 15 Nov 1990 00:00:00 GMT" 266Value = "10" 271Value = "text/javascript" 276Value = "\"asdf1234\"" 281Value = "Thu, 15 Nov 1990 00:00:00 GMT" 286Value = "max-age=31536000, immutable" 298Value = "no-cache" 303Value = "10" 308Value = "text/javascript" 313Value = "\"asdf1234\"" 318Value = "Thu, 15 Nov 1990 00:00:00 GMT" 336Value = "10" 340Value = "text/javascript" 344Value = "integrity" 348Value = "Thu, 15 Nov 1990 00:00:00 GMT" 560Value = "10" 565Value = "text/css" 570Value = "\"asdf1234\"" 575Value = "Thu, 15 Nov 1990 00:00:00 GMT" 580Value = "max-age=31536000, immutable"
StaticWebAssets\GenerateStaticWebAssetEndpointsManifestTest.cs (20)
29Value = "max-age=31536000, immutable" 33Value = "10" 37Value = "text/html" 41Value = "\"integrity\"" 45Value = "Sat, 01 Jan 2000 00:00:01 GMT" 72Value = "max-age=31536000, immutable" 76Value = "10" 80Value = "text/javascript" 84Value = "\"integrity\"" 88Value = "Sat, 01 Jan 2000 00:00:01 GMT" 115Value = "no-cache" 119Value = "10" 123Value = "text/html" 127Value = "\"integrity\"" 131Value = "Sat, 01 Jan 2000 00:00:01 GMT" 148Value = "no-cache" 152Value = "10" 156Value = "text/javascript" 160Value = "\"integrity\"" 164Value = "Sat, 01 Jan 2000 00:00:01 GMT"
StaticWebAssets\GenerateStaticWebAssetEndpointsPropsFileTest.cs (2)
62Value = "10" 132Value = "10"
StaticWebAssets\GenerateStaticWebAssetsManifestTest.cs (4)
123Value = "__content-type__" 128Value = "__content-length__", 133Value = "__etag__", 138Value = "__last-modified__"
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\"" }];
StaticWebAssetsBaselineFactory.cs (4)
124header.Value = "__content-length__"; 127header.Value = "__etag__"; 130header.Value = "__last-modified__"; 142header.Value = string.Join(", ", cleaned);
46 references to Value
Microsoft.NET.Sdk.BlazorWebAssembly.Tests (5)
StaticWebAssetsBaselineComparer.cs (4)
141Array.Sort(endpoint.ResponseHeaders, (a, b) => (a.Name, a.Value).CompareTo((b.Name, b.Value))); 467assetDifferences.Add($"Expected manifest to have response header '{difference.Name}={difference.Value}' but it was not found."); 471assetDifferences.Add($"Found unexpected response header '{difference.Name}={difference.Value}'.");
StaticWebAssetsBaselineFactory.cs (1)
134var values = header.Value.Split(',').Select(v => v.Trim());
Microsoft.NET.Sdk.StaticWebAssets.Tasks (16)
ApplyCompressionNegotiation.cs (4)
169header.Value.Contains("Accept-Encoding", StringComparison.OrdinalIgnoreCase)) 265Value = header.Value 410Value = $"W/{header.Value}" 414Log.LogMessage(MessageImportance.Low, "Adding Content-Type '{1}' header to related endpoint '{0}'", relatedEndpointCandidate.Route, header.Value);
Data\StaticWebAssetEndpoint.cs (2)
359responseHeaderComparison = ResponseHeaders[i].Value.CompareTo(other.ResponseHeaders[i].Value);
Data\StaticWebAssetEndpointResponseHeader.cs (6)
29private string GetDebuggerDisplay() => $"{Name}: {Value}"; 35string.Equals(Value, other.Value, StringComparison.Ordinal); 45return HashCode.Combine(Name, Value); 510 => string.CompareOrdinal(Value, other.Value),
FilterStaticWebAssetEndpoints.cs (1)
122if (MeetsCriteria(criteria, header.Name, header.Value))
UpdateStaticWebAssetEndpoints.cs (3)
132var (headers, headerRemoved) = RemoveAllIfFound(endpoint.ResponseHeaders, h => h.Name, h => h.Value, operation.Name, operation.Value); 223h => h.Value, 290var (headers, headerRemoved) = RemoveFirstIfFound(endpoint.ResponseHeaders, h => h.Name, h => h.Value, operation.Name, operation.Value);
Microsoft.NET.Sdk.StaticWebAssets.Tests (25)
StaticWebAssetEndpointsIntegrationTest.cs (1)
198var length = long.Parse(contentLength.Value, CultureInfo.InvariantCulture);
StaticWebAssets\ApplyCompressionNegotiationTest.cs (2)
1562compressedEndpoint.ResponseHeaders.Should().Contain(h => h.Name == "ETag" && h.Value == "W/\"original-etag\""); 1696compressedEndpoint.ResponseHeaders.Should().NotContain(h => h.Name == "ETag" && h.Value.StartsWith("W/"));
StaticWebAssets\DefineStaticWebAssetEndpointsTest.cs (2)
430endpoint.ResponseHeaders.Should().ContainSingle(h => h.Name == "Content-Type" && h.Value == "application/x-gzip"); 481endpoint.ResponseHeaders.Should().ContainSingle(h => h.Name == "Content-Type" && h.Value == "text/css");
StaticWebAssets\FilterStaticWebAssetEndpointsTest.cs (2)
128filteredEndpoints.Should().AllSatisfy(e => e.ResponseHeaders.Should().ContainSingle(p => p.Name == "Content-Type" && p.Value == "text/html")); 238filteredEndpoints.Should().AllSatisfy(e => e.ResponseHeaders.Should().ContainSingle(p => p.Name == "Content-Type" && p.Value == "text/html"));
StaticWebAssets\UpdateStaticWebAssetEndpointsTest.cs (5)
56updatedEndpoint.ResponseHeaders.Should().ContainSingle(h => string.Equals(h.Name, "Cache-Control", StringComparison.Ordinal) && string.Equals(h.Value, "immutable")); 187updatedEndpoint.ResponseHeaders.Should().ContainSingle(h => string.Equals(h.Name, "ETag", StringComparison.Ordinal) && string.Equals(h.Value, "\"integrity\"", StringComparison.Ordinal)); 188updatedEndpoint.ResponseHeaders.Should().NotContain(h => string.Equals(h.Name, "ETag", StringComparison.Ordinal) && string.Equals(h.Value, "W/\"integrity\"", StringComparison.Ordinal)); 229updatedEndpoint.ResponseHeaders.Should().ContainSingle(h => string.Equals(h.Name, "Cache-Control", StringComparison.Ordinal) && string.Equals(h.Value, "immutable")); 291updatedEndpoint.ResponseHeaders.Should().ContainSingle(h => string.Equals(h.Name, "Cache-Control", StringComparison.Ordinal) && string.Equals(h.Value, "immutable"));
StaticWebAssetsBaselineComparer.cs (4)
141Array.Sort(endpoint.ResponseHeaders, (a, b) => (a.Name, a.Value).CompareTo((b.Name, b.Value))); 467assetDifferences.Add($"Expected manifest to have response header '{difference.Name}={difference.Value}' but it was not found."); 471assetDifferences.Add($"Found unexpected response header '{difference.Name}={difference.Value}'.");
StaticWebAssetsBaselineFactory.cs (1)
134var values = header.Value.Split(',').Select(v => v.Trim());
StaticWebAssetsCompressionIntegrationTest.cs (8)
74endpoint.ResponseHeaders.Where(e => e.Name == "Content-Encoding").Select(e => e.Value).Single().Should().Be("gzip"); 76var etags = endpoint.ResponseHeaders.Where(e => e.Name == "ETag").Select(e => EntityTagHeaderValue.Parse(e.Value)); 86endpoint.ResponseHeaders.Where(e => e.Name == "Content-Encoding").Select(e => e.Value).Single().Should().Be("br"); 88var etags = endpoint.ResponseHeaders.Where(e => e.Name == "ETag").Select(e => EntityTagHeaderValue.Parse(e.Value)); 186endpoint.ResponseHeaders.Where(e => e.Name == "Content-Encoding").Select(e => e.Value).Single().Should().Be("gzip"); 188var etags = endpoint.ResponseHeaders.Where(e => e.Name == "ETag").Select(e => EntityTagHeaderValue.Parse(e.Value)); 198endpoint.ResponseHeaders.Where(e => e.Name == "Content-Encoding").Select(e => e.Value).Single().Should().Be("br"); 200var etags = endpoint.ResponseHeaders.Where(e => e.Name == "ETag").Select(e => EntityTagHeaderValue.Parse(e.Value));