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