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)
215if (resource.TryGetLastAnnotation<JavaScriptInstallCommandAnnotation>(out var installCommand)) 550if (resource.TryGetLastAnnotation<JavaScriptInstallCommandAnnotation>(out var installCommand)) 583JavaScriptInstallCommandAnnotation? prodInstallCommand = null; 586resource.TryGetLastAnnotation<JavaScriptInstallCommandAnnotation>(out prodInstallCommand) && 592var install = prodInstallCommand!; 923!dockerfileContext.Resource.TryGetLastAnnotation<JavaScriptInstallCommandAnnotation>(out var installCommand)) 1544private 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 1589private static string BuildProductionInstallCommand(JavaScriptPackageManagerAnnotation packageManager, JavaScriptInstallCommandAnnotation installCommand) 1713if (c.Resource.TryGetLastAnnotation<JavaScriptInstallCommandAnnotation>(out var installCommand)) 1833var 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)
157Assert.False(bunResource.TryGetLastAnnotation<JavaScriptInstallCommandAnnotation>(out _)); 181Assert.True(bunResource.TryGetLastAnnotation<JavaScriptInstallCommandAnnotation>(out var installAnnotation));
AddDenoAppTests.cs (3)
1267Assert.False(denoResource.TryGetLastAnnotation<JavaScriptInstallCommandAnnotation>(out _)); 1291Assert.True(denoResource.TryGetLastAnnotation<JavaScriptInstallCommandAnnotation>(out var installAnnotation));
AddNodeAppTests.cs (3)
253Assert.False(nodeResource.TryGetLastAnnotation<JavaScriptInstallCommandAnnotation>(out _)); 282Assert.True(nodeResource.TryGetLastAnnotation<JavaScriptInstallCommandAnnotation>(out var installAnnotation));
PackageInstallationTests.cs (31)
100Assert.True(nodeResource.TryGetLastAnnotation<JavaScriptInstallCommandAnnotation>(out var installAnnotation)); 134Assert.True(nodeResource.TryGetLastAnnotation<JavaScriptInstallCommandAnnotation>(out var _)); 168Assert.True(nodeResource.TryGetLastAnnotation<JavaScriptInstallCommandAnnotation>(out var installAnnotation)); 203Assert.True(nodeResource.TryGetLastAnnotation<JavaScriptInstallCommandAnnotation>(out var _)); 231Assert.True(nodeResource.TryGetLastAnnotation<JavaScriptInstallCommandAnnotation>(out var installAnnotation)); 303Assert.True(nodeResource.TryGetLastAnnotation<JavaScriptInstallCommandAnnotation>(out var installAnnotation)); 333Assert.True(nodeResource.TryGetLastAnnotation<JavaScriptInstallCommandAnnotation>(out var installAnnotation)); 361Assert.True(nodeResource.TryGetLastAnnotation<JavaScriptInstallCommandAnnotation>(out var installAnnotation)); 465Assert.True(app.Resource.TryGetLastAnnotation<JavaScriptInstallCommandAnnotation>(out var installCommand)); 477Assert.True(app.Resource.TryGetLastAnnotation<JavaScriptInstallCommandAnnotation>(out var installCommand)); 492Assert.True(app.Resource.TryGetLastAnnotation<JavaScriptInstallCommandAnnotation>(out var installCommand)); 498Assert.True(app2.Resource.TryGetLastAnnotation<JavaScriptInstallCommandAnnotation>(out installCommand)); 514Assert.True(app.Resource.TryGetLastAnnotation<JavaScriptInstallCommandAnnotation>(out var installCommand)); 530Assert.True(app.Resource.TryGetLastAnnotation<JavaScriptInstallCommandAnnotation>(out var installCommand)); 545Assert.True(app.Resource.TryGetLastAnnotation<JavaScriptInstallCommandAnnotation>(out var installCommand)); 560Assert.True(app.Resource.TryGetLastAnnotation<JavaScriptInstallCommandAnnotation>(out var installCommand));
ResourceCreationTests.cs (4)
112Assert.True(nodeResource.TryGetLastAnnotation<JavaScriptInstallCommandAnnotation>(out var installAnnotation)); 178Assert.True(nodeResource.TryGetLastAnnotation<JavaScriptInstallCommandAnnotation>(out var _));