6 instantiations of JavaScriptInstallCommandAnnotation
Aspire.Hosting.JavaScript (5)
JavaScriptHostingExtensions.cs (5)
2350
.WithAnnotation(new
JavaScriptInstallCommandAnnotation
([installCommand, .. installArgs ?? []])
2417
.WithAnnotation(new
JavaScriptInstallCommandAnnotation
(["install", .. installArgs])
2512
.WithAnnotation(new
JavaScriptInstallCommandAnnotation
(["install", .. installArgs]));
2598
.WithAnnotation(new
JavaScriptInstallCommandAnnotation
(["install", .. installArgs])
2683
.WithAnnotation(new
JavaScriptInstallCommandAnnotation
(["install", .. installArgs])
Aspire.Hosting.JavaScript.Tests (1)
AddNodeAppTests.cs (1)
176
.WithAnnotation(new
JavaScriptInstallCommandAnnotation
(["myinstall"]))
64 references to JavaScriptInstallCommandAnnotation
Aspire.Hosting.JavaScript (20)
JavaScriptHostingExtensions.cs (20)
215
if (resource.TryGetLastAnnotation<
JavaScriptInstallCommandAnnotation
>(out
var
installCommand))
550
if (resource.TryGetLastAnnotation<
JavaScriptInstallCommandAnnotation
>(out
var
installCommand))
583
JavaScriptInstallCommandAnnotation
? prodInstallCommand = null;
586
resource.TryGetLastAnnotation<
JavaScriptInstallCommandAnnotation
>(out prodInstallCommand) &&
592
var
install = prodInstallCommand!;
923
!dockerfileContext.Resource.TryGetLastAnnotation<
JavaScriptInstallCommandAnnotation
>(out
var
installCommand))
1544
private static void AddInstallCommand(this DockerfileStage builderStage, JavaScriptPackageManagerAnnotation packageManager,
JavaScriptInstallCommandAnnotation
installCommand)
1584
/// <see cref="
JavaScriptInstallCommandAnnotation
.ProductionInstallArgs"/> is deliberately not quoted. Unlike the
1585
/// entries in <see cref="
JavaScriptInstallCommandAnnotation
.Args"/>, which are individual tokens, it is documented
1589
private static string BuildProductionInstallCommand(JavaScriptPackageManagerAnnotation packageManager,
JavaScriptInstallCommandAnnotation
installCommand)
1713
if (c.Resource.TryGetLastAnnotation<
JavaScriptInstallCommandAnnotation
>(out
var
installCommand))
1833
var
installAnnotation = c.Resource.TryGetLastAnnotation<
JavaScriptInstallCommandAnnotation
>(out
var
installCmd) ? installCmd : null;
3045
!resource.Resource.TryGetLastAnnotation<
JavaScriptInstallCommandAnnotation
>(out
var
installCommand))
Aspire.Hosting.JavaScript.Tests (44)
AddBunAppTests.cs (3)
157
Assert.False(bunResource.TryGetLastAnnotation<
JavaScriptInstallCommandAnnotation
>(out _));
181
Assert.True(bunResource.TryGetLastAnnotation<
JavaScriptInstallCommandAnnotation
>(out
var
installAnnotation));
AddDenoAppTests.cs (3)
1267
Assert.False(denoResource.TryGetLastAnnotation<
JavaScriptInstallCommandAnnotation
>(out _));
1291
Assert.True(denoResource.TryGetLastAnnotation<
JavaScriptInstallCommandAnnotation
>(out
var
installAnnotation));
AddNodeAppTests.cs (3)
253
Assert.False(nodeResource.TryGetLastAnnotation<
JavaScriptInstallCommandAnnotation
>(out _));
282
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
_));