55 writes to Selectors
Microsoft.NET.Sdk.StaticWebAssets.Tasks (5)
ApplyCompressionNegotiation.cs (1)
276
Selectors
= [
UpdateStaticWebAssetEndpoints.cs (4)
127
endpoint.
Selectors
= selectors;
215
endpoint.
Selectors
= selectors;
285
endpoint.
Selectors
= selectors;
317
endpoint.
Selectors
= [
Microsoft.NET.Sdk.StaticWebAssets.Tests (50)
StaticWebAssets\ApplyCompressionNegotiationTest.cs (41)
89
Selectors
= [ new () { Name = "Content-Encoding", Value = "gzip", Quality = "0.100000000000" } ],
102
Selectors
= [],
116
Selectors
= []
193
Selectors
= [
259
Selectors
= [
494
Selectors
= [
550
Selectors
= [
814
Selectors
= [ new () { Name = "Content-Encoding", Value = "gzip", Quality = "0.100000000000" } ],
826
Selectors
= [],
839
Selectors
= [ new () { Name = "Content-Encoding", Value = "gzip", Quality = "0.100000000000" } ],
851
Selectors
= [],
864
Selectors
= []
919
Selectors
= [ new StaticWebAssetEndpointSelector { Name = "Content-Encoding", Value = "gzip", Quality = "0.100000000000" } ],
930
Selectors
= [],
943
Selectors
= [ new () { Name = "Content-Encoding", Value = "gzip", Quality = "0.100000000000" } ],
954
Selectors
= [],
967
Selectors
= []
990
Selectors
= [ new StaticWebAssetEndpointSelector { Name = "Content-Encoding", Value = "gzip", Quality = "0.100000000000" } ],
1002
Selectors
= [],
1015
Selectors
= [ new StaticWebAssetEndpointSelector { Name = "Content-Encoding", Value = "gzip", Quality = "0.100000000000" } ],
1027
Selectors
= [],
1040
Selectors
= []
1111
Selectors
= [ new StaticWebAssetEndpointSelector { Name = "Content-Encoding", Value = "gzip", Quality = "0.100000000000" } ],
1122
Selectors
= [],
1135
Selectors
= [ new () { Name = "Content-Encoding", Value = "gzip", Quality = "0.100000000000" } ],
1146
Selectors
= [],
1159
Selectors
= []
1170
Selectors
= []
1193
Selectors
= [ new StaticWebAssetEndpointSelector { Name = "Content-Encoding", Value = "gzip", Quality = "0.100000000000" } ],
1206
Selectors
= [ new StaticWebAssetEndpointSelector { Name = "Content-Encoding", Value = "br", Quality = "0.100000000000" } ],
1218
Selectors
= [],
1231
Selectors
= [ new StaticWebAssetEndpointSelector { Name = "Content-Encoding", Value = "gzip", Quality = "0.100000000000" } ],
1244
Selectors
= [ new StaticWebAssetEndpointSelector { Name = "Content-Encoding", Value = "br", Quality = "0.100000000000" } ],
1256
Selectors
= [],
1269
Selectors
= []
1282
Selectors
= []
1378
Selectors
= [ new () { Name = "Content-Encoding", Value = "gzip", Quality = "0.100000000000" } ],
1391
Selectors
= [],
1405
Selectors
= []
1418
Selectors
= [],
1494
Selectors
= responseSelector ?? []
StaticWebAssets\DefineStaticWebAssetEndpointsTest.cs (1)
650
Selectors
= responseSelector ?? []
StaticWebAssets\FilterStaticWebAssetEndpointsTest.cs (1)
177
endpoints[0].
Selectors
= [new StaticWebAssetEndpointSelector { Name = "Content-Encoding", Value = "gzip" }];
StaticWebAssets\GenerateStaticWebAssetEndpointsManifestTest.cs (4)
24
Selectors
= [],
67
Selectors
= [],
110
Selectors
= [],
143
Selectors
= [],
StaticWebAssets\GenerateStaticWebAssetEndpointsPropsFileTest.cs (1)
214
Selectors
= responseSelector ?? []
StaticWebAssets\GenerateStaticWebAssetsManifestTest.cs (1)
116
Selectors
= [],
StaticWebAssets\UpdateStaticWebAssetEndpointsTest.cs (1)
254
Selectors
= [new StaticWebAssetEndpointSelector { Name = "Content-Encoding", Value = "gzip" }],
67 references to Selectors
Microsoft.NET.Sdk.BlazorWebAssembly.Tests (10)
StaticWebAssetsBaselineComparer.cs (7)
97
{string.Join($"{Environment.NewLine} ", foundDuplicateEndpoints.Select(a => @$"{a.Key.Route} - {a.Key.AssetFile} - {a.Key.
Selectors
.Length} - {a.Value.Length}"))}{Environment.NewLine}");
121
if (endpoint.Route.EndsWith(".gz") || endpoint.Route.EndsWith(".br") || endpoint.
Selectors
.Length == 1)
140
Array.Sort(endpoint.
Selectors
, (a, b) => (a.Name, a.Value).CompareTo((b.Name, b.Value)));
405
string.Join($"{Environment.NewLine}\t", expectedEndpoints.Select(a => $"{a.Route} - {a.
Selectors
.Length} - {a.AssetFile}")),
407
string.Join($"{Environment.NewLine}\t", manifestEndpoints.Select(a => $"{a.Route} - {a.
Selectors
.Length} - {a.AssetFile}"))
444
ComputeSelectorDifferences(assetDifferences, manifestAsset.
Selectors
, expectedAsset.
Selectors
);
StaticWebAssetsBaselineFactory.cs (3)
172
for (var i = 0; i < endpoint.
Selectors
.Length; i++)
174
ref var selector = ref endpoint.
Selectors
[i];
208
Array.Sort(endpoint.
Selectors
);
Microsoft.NET.Sdk.StaticWebAssets.Tasks (35)
ApplyCompressionNegotiation.cs (3)
277
..relatedEndpointCandidate.
Selectors
,
308
for (var i = 0; i < compressedEndpoint.
Selectors
.Length; i++)
310
var selector = compressedEndpoint.
Selectors
[i];
Data\StaticWebAssetEndpoint.cs (23)
67
_selectorsString ??= _originalItem?.GetMetadata(nameof(
Selectors
));
234
Selectors
.SequenceEqual(other.
Selectors
) &&
261
for (var i = 0; i <
Selectors
.Length; i++)
263
hashCode.Add(
Selectors
[i]);
278
$"{nameof(StaticWebAssetEndpoint)}: Route = {Route}, AssetFile = {AssetFile}, Selectors = {StaticWebAssetEndpointSelector.ToMetadataValue(
Selectors
?? [])}, ResponseHeaders = {ResponseHeaders?.Length}, EndpointProperties = {StaticWebAssetEndpointProperty.ToMetadataValue(EndpointProperties ?? [])}";
294
if (
Selectors
.Length > other.
Selectors
.Length)
298
else if (
Selectors
.Length < other.
Selectors
.Length)
303
for (var i = 0; i <
Selectors
.Length; i++)
305
var selectorComparison =
Selectors
[i].Name.CompareTo(other.
Selectors
[i].Name);
311
selectorComparison =
Selectors
[i].Value.CompareTo(other.
Selectors
[i].Value);
424
nameof(
Selectors
),
457
nameof(
Selectors
) => !_selectorsModified ? SelectorsString ?? "" : StaticWebAssetEndpointSelector.ToMetadataValue(
Selectors
),
472
case nameof(
Selectors
):
500
{ nameof(
Selectors
), !_selectorsModified ? SelectorsString ?? "" : StaticWebAssetEndpointSelector.ToMetadataValue(
Selectors
) },
525
destinationItem.SetMetadata(nameof(
Selectors
), !_selectorsModified ? SelectorsString ?? "" : StaticWebAssetEndpointSelector.ToMetadataValue(
Selectors
));
FilterStaticWebAssetEndpoints.cs (2)
102
for (var j = 0; j < endpoint.
Selectors
.Length; j++)
104
var selector = endpoint.
Selectors
[j];
GenerateStaticWebAssetEndpointsPropsFile.cs (2)
57
new XElement(nameof(StaticWebAssetEndpoint.
Selectors
), new XCData(StaticWebAssetEndpointSelector.ToMetadataValue(element.
Selectors
))),
OverrideHtmlAssetPlaceholders.cs (1)
175
if (endpoint.
Selectors
?.Length == 0)
UpdateStaticWebAssetEndpoints.cs (4)
124
var (selectors, selectorRemoved) = RemoveAllIfFound(endpoint.
Selectors
, s => s.Name, s => s.Value, operation.Name, operation.Value);
206
endpoint.
Selectors
,
282
var (selectors, selectorRemoved) = RemoveFirstIfFound(endpoint.
Selectors
, s => s.Name, s => s.Value, operation.Name, operation.Value);
318
..endpoint.
Selectors
,
Microsoft.NET.Sdk.StaticWebAssets.Tests (22)
StaticWebAssetEndpointsIntegrationTest.cs (10)
216
var uncompressedAppJsEndpoint = appJsEndpoints.Where(ep => ep.
Selectors
.Length == 0);
231
var gzipCompressedAppJsEndpoint = appJsEndpoints.Where(ep => ep.
Selectors
.Length == 1 && ep.
Selectors
[0].Value == "gzip");
245
var brotliCompressedAppJsEndpoint = appJsEndpoints.Where(ep => ep.
Selectors
.Length == 1 && ep.
Selectors
[0].Value == "br");
333
var unCompressedAssetEndpoint = appJsEndpoints.Where(ep => ep.
Selectors
.Length == 0);
341
var appGzAssetEndpoint = appJsEndpoints.Where(ep => ep.
Selectors
.Length == 1 && ep.
Selectors
[0].Value == "gzip");
350
var appBrAssetEndpoint = appJsEndpoints.Where(ep => ep.
Selectors
.Length == 1 && ep.
Selectors
[0].Value == "br");
StaticWebAssets\ReadStaticWebAssetsManifestFileTest.cs (1)
199
endpoint.GetMetadata(nameof(StaticWebAssetEndpoint.
Selectors
)).Should().BeEquivalentTo("""[{"Name":"Content-Encoding","Value":"gzip","Quality":"0.9"}]""");
StaticWebAssetsBaselineComparer.cs (7)
97
{string.Join($"{Environment.NewLine} ", foundDuplicateEndpoints.Select(a => @$"{a.Key.Route} - {a.Key.AssetFile} - {a.Key.
Selectors
.Length} - {a.Value.Length}"))}{Environment.NewLine}");
121
if (endpoint.Route.EndsWith(".gz") || endpoint.Route.EndsWith(".br") || endpoint.
Selectors
.Length == 1)
140
Array.Sort(endpoint.
Selectors
, (a, b) => (a.Name, a.Value).CompareTo((b.Name, b.Value)));
405
string.Join($"{Environment.NewLine}\t", expectedEndpoints.Select(a => $"{a.Route} - {a.
Selectors
.Length} - {a.AssetFile}")),
407
string.Join($"{Environment.NewLine}\t", manifestEndpoints.Select(a => $"{a.Route} - {a.
Selectors
.Length} - {a.AssetFile}"))
444
ComputeSelectorDifferences(assetDifferences, manifestAsset.
Selectors
, expectedAsset.
Selectors
);
StaticWebAssetsBaselineFactory.cs (3)
172
for (var i = 0; i < endpoint.
Selectors
.Length; i++)
174
ref var selector = ref endpoint.
Selectors
[i];
208
Array.Sort(endpoint.
Selectors
);
StaticWebAssetsFingerprintingTest.cs (1)
176
=> endpoints.Endpoints.FirstOrDefault(e => e.Route == route && e.
Selectors
.Length == 0)?.AssetFile ?? throw new Exception($"Missing endpoint for file '{route}' in '{endpointsManifestPath}'");