6 instantiations of JavaScriptInstallCommandAnnotation
Aspire.Hosting.JavaScript (5)
JavaScriptHostingExtensions.cs (5)
2352
.WithAnnotation(new
JavaScriptInstallCommandAnnotation
([installCommand, .. installArgs ?? []])
2419
.WithAnnotation(new
JavaScriptInstallCommandAnnotation
(["install", .. installArgs])
2514
.WithAnnotation(new
JavaScriptInstallCommandAnnotation
(["install", .. installArgs]));
2600
.WithAnnotation(new
JavaScriptInstallCommandAnnotation
(["install", .. installArgs])
2685
.WithAnnotation(new
JavaScriptInstallCommandAnnotation
(["install", .. installArgs])
Aspire.Hosting.JavaScript.Tests (1)
AddNodeAppTests.cs (1)
178
.WithAnnotation(new
JavaScriptInstallCommandAnnotation
(["myinstall"]))
64 references to JavaScriptInstallCommandAnnotation
Aspire.Hosting.JavaScript (20)
JavaScriptHostingExtensions.cs (20)
217
if (resource.TryGetLastAnnotation<
JavaScriptInstallCommandAnnotation
>(out
var
installCommand))
552
if (resource.TryGetLastAnnotation<
JavaScriptInstallCommandAnnotation
>(out
var
installCommand))
585
JavaScriptInstallCommandAnnotation
? prodInstallCommand = null;
588
resource.TryGetLastAnnotation<
JavaScriptInstallCommandAnnotation
>(out prodInstallCommand) &&
594
var
install = prodInstallCommand!;
925
!dockerfileContext.Resource.TryGetLastAnnotation<
JavaScriptInstallCommandAnnotation
>(out
var
installCommand))
1546
private static void AddInstallCommand(this DockerfileStage builderStage, JavaScriptPackageManagerAnnotation packageManager,
JavaScriptInstallCommandAnnotation
installCommand)
1586
/// <see cref="
JavaScriptInstallCommandAnnotation
.ProductionInstallArgs"/> is deliberately not quoted. Unlike the
1587
/// entries in <see cref="
JavaScriptInstallCommandAnnotation
.Args"/>, which are individual tokens, it is documented
1591
private static string BuildProductionInstallCommand(JavaScriptPackageManagerAnnotation packageManager,
JavaScriptInstallCommandAnnotation
installCommand)
1715
if (c.Resource.TryGetLastAnnotation<
JavaScriptInstallCommandAnnotation
>(out
var
installCommand))
1835
var
installAnnotation = c.Resource.TryGetLastAnnotation<
JavaScriptInstallCommandAnnotation
>(out
var
installCmd) ? installCmd : null;
3047
!resource.Resource.TryGetLastAnnotation<
JavaScriptInstallCommandAnnotation
>(out
var
installCommand))
Aspire.Hosting.JavaScript.Tests (44)
AddBunAppTests.cs (3)
159
Assert.False(bunResource.TryGetLastAnnotation<
JavaScriptInstallCommandAnnotation
>(out _));
183
Assert.True(bunResource.TryGetLastAnnotation<
JavaScriptInstallCommandAnnotation
>(out
var
installAnnotation));
AddDenoAppTests.cs (3)
1268
Assert.False(denoResource.TryGetLastAnnotation<
JavaScriptInstallCommandAnnotation
>(out _));
1292
Assert.True(denoResource.TryGetLastAnnotation<
JavaScriptInstallCommandAnnotation
>(out
var
installAnnotation));
AddNodeAppTests.cs (3)
255
Assert.False(nodeResource.TryGetLastAnnotation<
JavaScriptInstallCommandAnnotation
>(out _));
284
Assert.True(nodeResource.TryGetLastAnnotation<
JavaScriptInstallCommandAnnotation
>(out
var
installAnnotation));
PackageInstallationTests.cs (31)
100
Assert.True(nodeResource.TryGetLastAnnotation<
JavaScriptInstallCommandAnnotation
>(out
var
installAnnotation));
134
Assert.True(nodeResource.TryGetLastAnnotation<
JavaScriptInstallCommandAnnotation
>(out
var
_));
168
Assert.True(nodeResource.TryGetLastAnnotation<
JavaScriptInstallCommandAnnotation
>(out
var
installAnnotation));
203
Assert.True(nodeResource.TryGetLastAnnotation<
JavaScriptInstallCommandAnnotation
>(out
var
_));
231
Assert.True(nodeResource.TryGetLastAnnotation<
JavaScriptInstallCommandAnnotation
>(out
var
installAnnotation));
303
Assert.True(nodeResource.TryGetLastAnnotation<
JavaScriptInstallCommandAnnotation
>(out
var
installAnnotation));
333
Assert.True(nodeResource.TryGetLastAnnotation<
JavaScriptInstallCommandAnnotation
>(out
var
installAnnotation));
361
Assert.True(nodeResource.TryGetLastAnnotation<
JavaScriptInstallCommandAnnotation
>(out
var
installAnnotation));
465
Assert.True(app.Resource.TryGetLastAnnotation<
JavaScriptInstallCommandAnnotation
>(out
var
installCommand));
477
Assert.True(app.Resource.TryGetLastAnnotation<
JavaScriptInstallCommandAnnotation
>(out
var
installCommand));
492
Assert.True(app.Resource.TryGetLastAnnotation<
JavaScriptInstallCommandAnnotation
>(out
var
installCommand));
498
Assert.True(app2.Resource.TryGetLastAnnotation<
JavaScriptInstallCommandAnnotation
>(out installCommand));
514
Assert.True(app.Resource.TryGetLastAnnotation<
JavaScriptInstallCommandAnnotation
>(out
var
installCommand));
530
Assert.True(app.Resource.TryGetLastAnnotation<
JavaScriptInstallCommandAnnotation
>(out
var
installCommand));
545
Assert.True(app.Resource.TryGetLastAnnotation<
JavaScriptInstallCommandAnnotation
>(out
var
installCommand));
560
Assert.True(app.Resource.TryGetLastAnnotation<
JavaScriptInstallCommandAnnotation
>(out
var
installCommand));
ResourceCreationTests.cs (4)
112
Assert.True(nodeResource.TryGetLastAnnotation<
JavaScriptInstallCommandAnnotation
>(out
var
installAnnotation));
178
Assert.True(nodeResource.TryGetLastAnnotation<
JavaScriptInstallCommandAnnotation
>(out
var
_));