36 writes to RelativePath
Microsoft.NET.Sdk.BlazorWebAssembly.Tests (1)
StaticWebAssetsBaselineFactory.cs (1)
227
asset.
RelativePath
= TemplatizeFilePath(
Microsoft.NET.Sdk.StaticWebAssets.Tasks (7)
Compression\DiscoverPrecompressedAssets.cs (1)
110
asset.
RelativePath
= $"{relativePath}{fileExtension}";
Compression\ResolveCompressedAssets.cs (2)
310
RelativePath
= $"{relativePath}{fileExtension}",
319
RelativePath
= $"{relativePath}{fileExtension}",
Data\StaticWebAsset.cs (3)
713
RelativePath
= relativePath,
745
RelativePath
= Normalize(RelativePath, allowEmpyPath: true);
1431
RelativePath
= metadataValue;
UpdateExternallyDefinedStaticWebAssets.cs (1)
59
asset.
RelativePath
= newRelativePath;
Microsoft.NET.Sdk.StaticWebAssets.Tests (28)
ComputeStaticWebAssetsTargetPathsTest.cs (1)
118
RelativePath
= relativePath,
StaticWebAssets\ApplyCompressionNegotiationTest.cs (1)
1458
RelativePath
= relativePath,
StaticWebAssets\ComputeEndpointsForReferenceStaticWebAssetsTest.cs (1)
112
RelativePath
= relativePath,
StaticWebAssets\ComputeReferenceStaticWebAssetItemsTest.cs (1)
354
RelativePath
= relativePath,
StaticWebAssets\ComputeStaticWebAssetsForCurrentProjectTest.cs (1)
293
RelativePath
= relativePath,
StaticWebAssets\DefineStaticWebAssetEndpointsTest.cs (1)
605
RelativePath
= relativePath,
StaticWebAssets\DiscoverPrecompressedAssetsTest.cs (2)
38
RelativePath
= "js/site#[.{fingerprint}]?.js",
63
RelativePath
= "js/site.js#[.{fingerprint}]?.gz",
StaticWebAssets\DiscoverStaticWebAssetsTest.cs (2)
668
cache.CachedAssets["input2"] = new StaticWebAsset { Identity = cachedAsset.ItemSpec,
RelativePath
= "Input2.txt" };
675
cache.AppendAsset("input1", new StaticWebAsset { Identity = newAsset.ItemSpec,
RelativePath
= "Input1.txt" }, newAsset);
StaticWebAssets\FilterStaticWebAssetEndpointsTest.cs (1)
292
RelativePath
= relativePath ?? itemSpec,
StaticWebAssets\GenerateStaticWebAssetEndpointsManifestTest.cs (1)
470
RelativePath
= relativePath ?? itemSpec,
StaticWebAssets\GenerateStaticWebAssetEndpointsPropsFileTest.cs (1)
178
RelativePath
= relativePath,
StaticWebAssets\GenerateStaticWebAssetsDevelopmentManifestTest.cs (1)
736
RelativePath
= relativePath,
StaticWebAssets\GenerateStaticWebAssetsManifestTest.cs (2)
152
a => a.
RelativePath
= "",
412
RelativePath
= relativePath,
StaticWebAssets\ResolveCompressedAssetsTest.cs (9)
44
RelativePath
= Path.GetFileName(ItemSpec),
90
RelativePath
= "js/site#[.{fingerprint}]?.js",
115
RelativePath
= "js/site.js#[.{fingerprint}]?.gz",
164
RelativePath
= Path.GetFileName(ItemSpec),
209
RelativePath
= Path.GetFileNameWithoutExtension(ItemSpec)+"#[.{fingerprint}]" + Path.GetExtension(ItemSpec),
266
RelativePath
= Path.GetFileName(ItemSpec),
310
RelativePath
= Path.GetFileName(ItemSpec),
359
RelativePath
= Path.GetFileName(ItemSpec),
424
RelativePath
= Path.GetFileName(ItemSpec),
StaticWebAssets\ResolveFingerprintedStaticWebAssetEndpointsForAssetsTest.cs (1)
245
RelativePath
= relativePath,
StaticWebAssets\UpdateStaticWebAssetEndpointsTest.cs (1)
357
RelativePath
= relativePath ?? itemSpec,
StaticWebAssetsBaselineFactory.cs (1)
227
asset.
RelativePath
= TemplatizeFilePath(
77 references to RelativePath
Microsoft.NET.Sdk.BlazorWebAssembly.Tests (11)
AspNetSdkBaselineTest.cs (3)
130
!File.Exists(Path.Combine(a.ContentRoot, a.
RelativePath
)) &&
134
.Select(a => Path.GetFullPath(Path.Combine(outputFolder, "wwwroot", a.
RelativePath
)))
136
.Select(a => Path.GetFullPath(Path.Combine(a.ContentRoot, a.
RelativePath
))))
StaticWebAssetsBaselineComparer.cs (6)
47
.ThenBy(a => a.
RelativePath
)
62
.ThenBy(a => a.
RelativePath
)
274
if (manifestAsset.
RelativePath
!= expectedAsset.
RelativePath
)
276
assetDifferences.Add($"Expected manifest RelativePath of {expectedAsset.
RelativePath
} but found {manifestAsset.
RelativePath
}.");
StaticWebAssetsBaselineFactory.cs (2)
91
var relativePath = asset.
RelativePath
.Replace('/', Path.DirectorySeparatorChar);
228
asset.
RelativePath
,
Microsoft.NET.Sdk.StaticWebAssets.Tasks (37)
ApplyCompressionNegotiation.cs (1)
333
Log.LogWarning("Endpoints not found for compressed asset: {0} {1}", compressedAsset.
RelativePath
, compressedAsset.Identity);
Compression\DiscoverPrecompressedAssets.cs (4)
39
if (HasCompressionExtension(candidate.
RelativePath
) &&
56
Path.GetFileNameWithoutExtension(candidate.
RelativePath
));
97
if (!asset.
RelativePath
.EndsWith(".gz", StringComparison.OrdinalIgnoreCase))
108
var relativePath = relatedAsset.EmbedTokens(relatedAsset.
RelativePath
);
Compression\ResolveCompressedAssets.cs (3)
86
var relativePath = asset.ComputePathWithoutTokens(asset.
RelativePath
);
147
relativePath ??= asset.EmbedTokens(asset.
RelativePath
);
190
var relativePath = asset.ComputePathWithoutTokens(asset.
RelativePath
);
Data\StaticWebAsset.cs (22)
62
_relativePath = asset.
RelativePath
;
142
get => _relativePath ??= GetOriginalItemMetadata(nameof(
RelativePath
));
560
RelativePath
, separator);
613
if (string.IsNullOrEmpty(
RelativePath
))
615
throw new InvalidOperationException($"The '{nameof(
RelativePath
)}' for the asset must be defined for '{Identity}'.");
745
RelativePath = Normalize(
RelativePath
, allowEmpyPath: true);
888
result = string.Compare(
RelativePath
, other.
RelativePath
, StringComparison.Ordinal);
980
RelativePath
== other.
RelativePath
&&
1070
var pathWithTokens = Path.Combine(prefix, computedBasePath,
RelativePath
)
1123
$"RelativePath: {
RelativePath
}, " +
1151
hash.Add(
RelativePath
);
1197
var pattern = StaticWebAssetPathPattern.Parse(
RelativePath
, Identity);
1334
nameof(
RelativePath
),
1387
nameof(
RelativePath
) =>
RelativePath
?? "",
1430
case nameof(
RelativePath
):
1496
{ nameof(
RelativePath
),
RelativePath
?? "" },
1535
destinationItem.SetMetadata(nameof(
RelativePath
),
RelativePath
?? "");
DefineStaticWebAssetEndpoints.cs (1)
204
var relativePath = asset.ComputePathWithoutTokens(asset.
RelativePath
);
DefineStaticWebAssets.cs (1)
285
UpdateAssetKindIfNecessary(assetsByRelativePath, asset.
RelativePath
, item);
GenerateStaticWebAssetEndpointsPropsFile.cs (1)
51
var path = asset.ReplaceTokens(asset.
RelativePath
, StaticWebAssetTokenResolver.Instance);
GenerateStaticWebAssetsDevelopmentManifest.cs (2)
328
return asset.ReplaceTokens(asset.
RelativePath
, StaticWebAssetTokenResolver.Instance);
336
return asset.ReplaceTokens(asset.
RelativePath
, StaticWebAssetTokenResolver.Instance);
GenerateStaticWebAssetsPropsFile.cs (1)
69
var relativePath = asset.ReplaceTokens(asset.
RelativePath
, tokenResolver);
UpdateExternallyDefinedStaticWebAssets.cs (1)
56
if (TryInferFingerprint(fingerprintExpressions, asset.
RelativePath
, out var fingerprint, out var newRelativePath))
Microsoft.NET.Sdk.StaticWebAssets.Tests (29)
AspNetSdkBaselineTest.cs (3)
130
!File.Exists(Path.Combine(a.ContentRoot, a.
RelativePath
)) &&
134
.Select(a => Path.GetFullPath(Path.Combine(outputFolder, "wwwroot", a.
RelativePath
)))
136
.Select(a => Path.GetFullPath(Path.Combine(a.ContentRoot, a.
RelativePath
))))
JsModulesIntegrationTest.cs (1)
312
var initializers = buildManifest.Assets.Where(a => a.
RelativePath
== "AnotherClassLib.lib.module.js");
StaticWebAssets\DiscoverStaticWebAssetsTest.cs (16)
53
asset.GetMetadata(nameof(StaticWebAsset.
RelativePath
)).Should().Be("candidate.js");
107
asset.GetMetadata(nameof(StaticWebAsset.
RelativePath
)).Should().Be(expectedRelativePath);
157
asset.GetMetadata(nameof(StaticWebAsset.
RelativePath
)).Should().Be(candidate);
208
asset.GetMetadata(nameof(StaticWebAsset.
RelativePath
)).Should().Be(expectedRelativePath);
255
asset.GetMetadata(nameof(StaticWebAsset.
RelativePath
)).Should().Be("subdir/candidate.js");
302
asset.GetMetadata(nameof(StaticWebAsset.
RelativePath
)).Should().Be("subdir/candidate.publish.js");
349
asset.GetMetadata(nameof(StaticWebAsset.
RelativePath
)).Should().Be("subdir/candidate.link.js");
682
Assert.Equal(cache.CachedAssets["input2"].
RelativePath
, otherManifest.CachedAssets["input2"].
RelativePath
);
684
Assert.Equal(cache.CachedAssets["input1"].
RelativePath
, otherManifest.CachedAssets["input1"].
RelativePath
);
726
task.Assets[0].GetMetadata(nameof(StaticWebAsset.
RelativePath
)).Should().Be("Microsoft.AspNetCore.Components.CustomElements.lib.module.js");
728
task.Assets[1].GetMetadata(nameof(StaticWebAsset.
RelativePath
)).Should().Be("Microsoft.AspNetCore.Components.CustomElements.lib.module.js.map");
766
task.Assets[0].GetMetadata(nameof(StaticWebAsset.
RelativePath
)).Should().Be("Microsoft.AspNetCore.Components.CustomElements.lib.module.js");
768
task.Assets[1].GetMetadata(nameof(StaticWebAsset.
RelativePath
)).Should().Be("Microsoft.AspNetCore.Components.CustomElements.lib.module.js.map");
803
task.Assets[0].GetMetadata(nameof(StaticWebAsset.
RelativePath
)).Should().Be("Components/Dropdown/Dropdown.razor.js");
StaticWebAssets\ReadStaticWebAssetsManifestFileTest.cs (1)
184
asset.GetMetadata(nameof(StaticWebAsset.
RelativePath
)).Should().BeEquivalentTo("ComponentApp.styles.css");
StaticWebAssetsBaselineComparer.cs (6)
47
.ThenBy(a => a.
RelativePath
)
62
.ThenBy(a => a.
RelativePath
)
274
if (manifestAsset.
RelativePath
!= expectedAsset.
RelativePath
)
276
assetDifferences.Add($"Expected manifest RelativePath of {expectedAsset.
RelativePath
} but found {manifestAsset.
RelativePath
}.");
StaticWebAssetsBaselineFactory.cs (2)
91
var relativePath = asset.
RelativePath
.Replace('/', Path.DirectorySeparatorChar);
228
asset.
RelativePath
,