1 write to Name
Aspire.Hosting (1)
ApplicationModel\ResourceCommandAnnotation.cs (1)
75Name = name;
180 references to Name
Aspire.Hosting (7)
ApplicationModel\ResourceCommandService.cs (2)
532var annotation = resource.Annotations.OfType<ResourceCommandAnnotation>().SingleOrDefault(a => string.Equals(a.Name, requestedCommandName, StringComparisons.CommandName)); 539annotation = resource.Annotations.OfType<ResourceCommandAnnotation>().SingleOrDefault(a => string.Equals(a.Name, mappedName, StringComparisons.CommandName));
ApplicationModel\ResourceNotificationService.cs (2)
1165var existingCommand = FindByName(previousState.Commands, annotation.Name); 1227return new ResourceCommandSnapshot(annotation.Name, state, annotation.DisplayName, annotation.DisplayDescription, annotation.Parameter, annotation.ConfirmationMessage, annotation.IconName, annotation.IconVariant, annotation.IsHighlighted)
Orchestrator\ParameterProcessor.cs (1)
206if (executionContext.IsRunMode && interactionService.IsAvailable && !parameterResource.Annotations.OfType<ResourceCommandAnnotation>().Any(a => a.Name.Equals(KnownResourceCommands.SetParameterCommand, StringComparisons.CommandName)))
ResourceBuilderExtensions.cs (2)
3319var existingAnnotation = builder.Resource.Annotations.OfType<ResourceCommandAnnotation>().SingleOrDefault(a => a.Name == name); 3386var existingAnnotation = builder.Resource.Annotations.OfType<ResourceCommandAnnotation>().SingleOrDefault(a => a.Name == name);
Aspire.Hosting.Azure (1)
AzureResourcePreparer.cs (1)
161if (resource.Annotations.OfType<ResourceCommandAnnotation>().SingleOrDefault(annotation => annotation.Name == name) is { } existingAnnotation)
Aspire.Hosting.Azure.Tests (86)
AzureEnvironmentResourceExtensionsTests.cs (86)
105command => command.Name == AzureProvisioningController.DeleteAzureResourcesCommandName); 166}.Order(), directory.Resource.Annotations.OfType<ResourceCommandAnnotation>().Select(command => command.Name).Order()); 169command => command.Name == AzureProvisioningController.DeleteAzureResourcesCommandName); 215arm.Resource.Annotations.OfType<ResourceCommandAnnotation>().Select(command => command.Name).Order()); 273command => command.Name == AzureProvisioningController.ChangeAzureContextCommandName); 301command => command.Name == AzureProvisioningController.ChangeAzureContextCommandName); 370var resetCommand = Assert.Single(environmentResource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.ResetProvisioningStateCommandName); 389Assert.Equal(AzureProvisioningController.ResetProvisioningStateCommandName, command.Name); 394Assert.Equal(AzureProvisioningController.ChangeAzureContextCommandName, command.Name); 399Assert.Equal(AzureProvisioningController.ReprovisionAllCommandName, command.Name); 404Assert.Equal(AzureProvisioningController.DeleteAzureResourcesCommandName, command.Name); 417var changeContextCommand = Assert.Single(environmentResource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.ChangeAzureContextCommandName); 481var changeContextCommand = Assert.Single(environmentResource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.ChangeAzureContextCommandName); 538var changeContextCommand = Assert.Single(environmentResource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.ChangeAzureContextCommandName); 582var changeContextCommand = Assert.Single(environmentResource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.ChangeAzureContextCommandName); 650var resetCommand = Assert.Single(environmentResource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.ResetProvisioningStateCommandName); 704var resetCommand = Assert.Single(environmentResource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.ResetProvisioningStateCommandName); 1000Assert.Contains(storage.Resource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.ForgetStateCommandName); 1001var changeLocationCommand = Assert.Single(storage.Resource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.ChangeResourceLocationCommandName); 1018Assert.Contains(storage.Resource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.GetAzureResourceCommandName); 1019var cancelCommand = Assert.Single(storage.Resource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.CancelCommandName); 1020var deleteCommand = Assert.Single(storage.Resource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.DeleteAzureResourceCommandName); 1021var reprovisionCommand = Assert.Single(storage.Resource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.ReprovisionResourceCommandName); 1026c.Name == AzureProvisioningController.ForgetStateCommandName || 1027c.Name == AzureProvisioningController.CancelCommandName || 1028c.Name == AzureProvisioningController.DeleteAzureResourceCommandName || 1029c.Name == AzureProvisioningController.ReprovisionResourceCommandName); 1089var changeLocationCommand = Assert.Single(postgres.Resource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.ChangeResourceLocationCommandName); 1170var getResourceCommand = Assert.Single(storage.Resource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.GetAzureResourceCommandName); 1254var getResourceCommand = Assert.Single(storage.Resource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.GetAzureResourceCommandName); 1523var getResourceCommand = Assert.Single(storage.Resource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.GetAzureResourceCommandName); 1587var getResourceCommand = Assert.Single(storage.Resource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.GetAzureResourceCommandName); 1648var getResourceCommand = Assert.Single(storage.Resource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.GetAzureResourceCommandName); 1709var cancelCommand = Assert.Single(storage.Resource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.CancelCommandName); 1844var cancelCommand = Assert.Single(storage.Resource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.CancelCommandName); 1902var command = Assert.Single(storage.Resource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == commandName); 1954var queuedReprovisionCommand = Assert.Single(storage2.Resource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.ReprovisionResourceCommandName); 1966var conflictingCommand = Assert.Single(storage2.Resource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.DeleteAzureResourceCommandName); 2049var cancelCommand = Assert.Single(storage.Resource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.CancelCommandName); 2133var deleteCommand = Assert.Single(storage.Resource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.DeleteAzureResourceCommandName); 2227var deleteCommand = Assert.Single(keyVault.Resource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.DeleteAzureResourceCommandName); 2298var deleteCommand = Assert.Single(storage.Resource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.DeleteAzureResourceCommandName); 2375var deleteCommand = Assert.Single(storage.Resource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.DeleteAzureResourceCommandName); 2376var cancelCommand = Assert.Single(storage.Resource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.CancelCommandName); 2455var forgetCommand = Assert.Single(storage.Resource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.ForgetStateCommandName); 2519var reprovisionCommand = Assert.Single(storage.Resource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.ReprovisionResourceCommandName); 2573var reprovisionCommand = Assert.Single(storage.Resource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.ReprovisionResourceCommandName); 2633var reprovisionCommand = Assert.Single(storage.Resource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.ReprovisionResourceCommandName); 2709var reprovisionStorageCommand = Assert.Single(storage.Resource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.ReprovisionResourceCommandName); 2710var reprovisionStorage2Command = Assert.Single(storage2.Resource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.ReprovisionResourceCommandName); 2786var reprovisionCommand = Assert.Single(storage.Resource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.ReprovisionResourceCommandName); 2787var cancelCommand = Assert.Single(storage.Resource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.CancelCommandName); 2885var cancelCommand = Assert.Single(storage.Resource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.CancelCommandName); 2931var cancelCommand = Assert.Single(storage.Resource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.CancelCommandName); 2983var reprovisionCommand = Assert.Single(storage.Resource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.ReprovisionResourceCommandName); 2984var cancelCommand = Assert.Single(storage2.Resource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.CancelCommandName); 3051var changeLocationCommand = Assert.Single(storage.Resource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.ChangeResourceLocationCommandName); 3124var changeLocationCommand = Assert.Single(storage.Resource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.ChangeResourceLocationCommandName); 3177var changeLocationCommand = Assert.Single(storage.Resource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.ChangeResourceLocationCommandName); 3237var changeLocationCommand = Assert.Single(visibleResource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.ChangeResourceLocationCommandName); 3292var changeLocationCommand = Assert.Single(storage.Resource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.ChangeResourceLocationCommandName); 3369var changeLocationCommand = Assert.Single(storage.Resource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.ChangeResourceLocationCommandName); 3429var changeLocationCommand = Assert.Single(storage.Resource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.ChangeResourceLocationCommandName); 3498var changeLocationCommand = Assert.Single(storage.Resource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.ChangeResourceLocationCommandName); 3555var changeLocationCommand = Assert.Single(storage.Resource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.ChangeResourceLocationCommandName); 3618var changeLocationCommand = Assert.Single(storage.Resource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.ChangeResourceLocationCommandName); 3690var changeLocationCommand = Assert.Single(storage.Resource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.ChangeResourceLocationCommandName); 3744var reprovisionAllCommand = Assert.Single(environmentResource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.ReprovisionAllCommandName); 3784var changeContextCommand = Assert.Single(environmentResource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.ChangeAzureContextCommandName); 3858var changeContextCommand = Assert.Single(environmentResource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.ChangeAzureContextCommandName); 3906var changeContextCommand = Assert.Single(environmentResource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.ChangeAzureContextCommandName); 3962var changeContextCommand = Assert.Single(environmentResource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.ChangeAzureContextCommandName); 4109var reprovisionCommand = Assert.Single(storage2.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.ReprovisionResourceCommandName); 4188var reprovisionCommand = Assert.Single(storage.Resource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.ReprovisionResourceCommandName); 4260var reprovisionCommand = Assert.Single(keyVault.Resource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.ReprovisionResourceCommandName); 4340var reprovisionCommand = Assert.Single(keyVault.Resource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.ReprovisionResourceCommandName); 4414var reprovisionCommand = Assert.Single(postgres.Resource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.ReprovisionResourceCommandName); 4466var changeLocationCommand = Assert.Single(storage.Resource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.ChangeResourceLocationCommandName); 4512var changeLocationCommand = Assert.Single(keyVault.Resource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.ChangeResourceLocationCommandName); 4558var reprovisionCommand = Assert.Single(storage.Resource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.ReprovisionResourceCommandName); 4624var reprovisionCommand = Assert.Single(storage.Resource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.ReprovisionResourceCommandName); 4865var deleteCommand = Assert.Single(environmentResource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.DeleteAzureResourcesCommandName); 4917var deleteCommand = Assert.Single(environmentResource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.DeleteAzureResourcesCommandName); 4964var deleteCommand = Assert.Single(environmentResource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.DeleteAzureResourcesCommandName); 5012var deleteCommand = Assert.Single(environmentResource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.DeleteAzureResourcesCommandName); 5151var cancelCommand = Assert.Single(storage.Resource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == AzureProvisioningController.CancelCommandName);
Aspire.Hosting.Blazor.Tests (8)
BlazorHostedExtensionsTests.cs (4)
192.Select(annotation => annotation.Name) 227annotation => annotation.Name == "debug-in-browser"); 264annotation => annotation.Name == "debug-in-browser"); 297annotation => annotation.Name == "debug-in-browser");
WithBlazorAppTests.cs (4)
211.Select(annotation => annotation.Name) 250var commands = wasmApp.Resource.Annotations.OfType<ResourceCommandAnnotation>().ToDictionary(annotation => annotation.Name); 291annotation => annotation.Name == "debug-in-browser"); 318annotation => annotation.Name == "debug-in-browser");
Aspire.Hosting.Browsers.Tests (6)
BrowserLogsBuilderExtensionsTests.cs (6)
57var command = Assert.Single(browserLogsResource.Annotations.OfType<ResourceCommandAnnotation>(), annotation => annotation.Name == BrowserLogsBuilderExtensions.OpenTrackedBrowserCommandName); 60var configureCommand = Assert.Single(browserLogsResource.Annotations.OfType<ResourceCommandAnnotation>(), annotation => annotation.Name == BrowserLogsBuilderExtensions.ConfigureTrackedBrowserCommandName); 63var screenshotCommand = Assert.Single(browserLogsResource.Annotations.OfType<ResourceCommandAnnotation>(), annotation => annotation.Name == BrowserLogsBuilderExtensions.CaptureScreenshotCommandName); 99var configureCommand = Assert.Single(browserLogsResource.Annotations.OfType<ResourceCommandAnnotation>(), annotation => annotation.Name == BrowserLogsBuilderExtensions.ConfigureTrackedBrowserCommandName); 154var configureCommand = Assert.Single(browserLogsResource.Annotations.OfType<ResourceCommandAnnotation>(), annotation => annotation.Name == BrowserLogsBuilderExtensions.ConfigureTrackedBrowserCommandName); 190var configureCommand = Assert.Single(browserLogsResource.Annotations.OfType<ResourceCommandAnnotation>(), annotation => annotation.Name == BrowserLogsBuilderExtensions.ConfigureTrackedBrowserCommandName);
Aspire.Hosting.DevTunnels.Tests (3)
DevTunnelResourceBuilderExtensionsTests.cs (3)
569var command = Assert.Single(port.Annotations.OfType<ResourceCommandAnnotation>(), a => a.Name == DevTunnelPortResource.ShowTunnelUrlsCommandName); 659var command = Assert.Single(port.Annotations.OfType<ResourceCommandAnnotation>(), a => a.Name == DevTunnelPortResource.ShowTunnelUrlsCommandName); 709var command = Assert.Single(port.Annotations.OfType<ResourceCommandAnnotation>(), a => a.Name == DevTunnelPortResource.ShowTunnelUrlsCommandName);
Aspire.Hosting.Dotnet.Tests (4)
DotnetProjectResourceTests.cs (4)
574var restartCommand = resource.Annotations.OfType<ResourceCommandAnnotation>().Single(a => a.Name == KnownResourceCommands.RestartCommand); 590annotation => annotation.Name == KnownResourceCommands.RebuildCommand); 602var restartCommand = resource.Annotations.OfType<ResourceCommandAnnotation>().Single(a => a.Name == KnownResourceCommands.RestartCommand); 605Assert.Contains(resource.Annotations.OfType<ResourceCommandAnnotation>(), a => a.Name == KnownResourceCommands.RebuildCommand);
Aspire.Hosting.EntityFrameworkCore (1)
EFCoreOperationExecutor.cs (1)
467if (toolResource.Annotations.OfType<ResourceCommandAnnotation>().Any(a => a.Name == KnownResourceCommands.StartCommand))
Aspire.Hosting.EntityFrameworkCore.Tests (18)
EFMigrationCommandsTests.cs (17)
23var updateCommand = commands.FirstOrDefault(c => c.Name.Contains("ef-database-update")); 37var dropCommand = commands.FirstOrDefault(c => c.Name.Contains("ef-database-drop")); 52var resetCommand = commands.FirstOrDefault(c => c.Name.Contains("ef-database-reset")); 67var addCommand = commands.FirstOrDefault(c => c.Name.Contains("ef-migrations-add")); 85var removeCommand = commands.FirstOrDefault(c => c.Name.Contains("ef-migrations-remove")); 99var statusCommand = commands.FirstOrDefault(c => c.Name.Contains("ef-database-status")); 115var efCommands = commands.Where(c => c.Name.Contains("ef-")).ToList(); 127var updateCommand = commands.FirstOrDefault(c => c.Name == "ef-database-update"); 153foreach (var command in commands.Where(c => c.Name.Contains("ef-"))) 168var dropCommand = commands.First(c => c.Name.Contains("ef-database-drop")); 169var resetCommand = commands.First(c => c.Name.Contains("ef-database-reset")); 184var updateCommand = commands.First(c => c.Name.Contains("ef-database-update")); 185var statusCommand = commands.First(c => c.Name.Contains("ef-database-status")); 207foreach (var command in commands.Where(c => c.Name.Contains("ef-"))) 237foreach (var command in commands.Where(c => c.Name.Contains("ef-"))) 268foreach (var command in commands.Where(c => c.Name.Contains("ef-"))) 288foreach (var command in commands.Where(c => c.Name.Contains("ef-")))
EFMigrationPipelineTests.cs (1)
348.SingleOrDefault(a => a.Name == EFCoreOperationExecutor.ToolStartCommandName);
Aspire.Hosting.Foundry.Tests (3)
HostedAgentExtensionTests.cs (3)
87Assert.Equal("send-message", command.Name); 122var result = await app.ResourceCommands.ExecuteCommandAsync(resource, command.Name, arguments); 141Assert.Equal("send-message", command.Name);
Aspire.Hosting.Maui (1)
Lifecycle\MauiBuildQueueEventSubscriber.cs (1)
512.SingleOrDefault(a => a.Name == KnownResourceCommands.StopCommand);
Aspire.Hosting.Maui.Tests (2)
MauiBuildQueueTests.cs (2)
592.Single(a => a.Name == KnownResourceCommands.StopCommand); 625.Single(a => a.Name == KnownResourceCommands.StopCommand);
Aspire.Hosting.MongoDB.Tests (1)
tests\Shared\ContainerReplCommandTestBase.cs (1)
34Assert.Equal("repl", commands[0].Name);
Aspire.Hosting.MySql.Tests (1)
tests\Shared\ContainerReplCommandTestBase.cs (1)
34Assert.Equal("repl", commands[0].Name);
Aspire.Hosting.PostgreSQL.Tests (1)
tests\Shared\ContainerReplCommandTestBase.cs (1)
34Assert.Equal("repl", commands[0].Name);
Aspire.Hosting.Redis.Tests (1)
tests\Shared\ContainerReplCommandTestBase.cs (1)
34Assert.Equal("repl", commands[0].Name);
Aspire.Hosting.SqlServer.Tests (1)
tests\Shared\ContainerReplCommandTestBase.cs (1)
34Assert.Equal("repl", commands[0].Name);
Aspire.Hosting.Tests (33)
Dashboard\DashboardEventHandlersTests.cs (4)
220command => Assert.Equal(KnownResourceCommands.StartCommand, command.Name), 221command => Assert.Equal(KnownResourceCommands.StopCommand, command.Name), 222command => Assert.Equal(KnownResourceCommands.RestartCommand, command.Name), 223command => Assert.Equal(KnownResourceCommands.RebuildCommand, command.Name));
Dcp\DcpExecutorTests.cs (7)
11579a => Assert.Equal(KnownResourceCommands.StartCommand, a.Name), 11580a => Assert.Equal(KnownResourceCommands.StopCommand, a.Name), 11581a => Assert.Equal(KnownResourceCommands.RestartCommand, a.Name)); 11588a => Assert.Equal(KnownResourceCommands.StartCommand, a.Name), 11589a => Assert.Equal(KnownResourceCommands.StopCommand, a.Name), 11590a => Assert.Equal(KnownResourceCommands.RestartCommand, a.Name), 11591a => Assert.Equal(KnownResourceCommands.RebuildCommand, a.Name));
Orchestrator\ParameterProcessorTests.cs (8)
1037.SingleOrDefault(a => a.Name == KnownResourceCommands.SetParameterCommand); 1057.Single(a => a.Name == KnownResourceCommands.SetParameterCommand); 1088.Single(a => a.Name == KnownResourceCommands.SetParameterCommand); 1113.Single(a => a.Name == KnownResourceCommands.SetParameterCommand); 1147.Single(a => a.Name == KnownResourceCommands.SetParameterCommand); 1185.Single(a => a.Name == KnownResourceCommands.DeleteParameterCommand); 1217.Single(a => a.Name == KnownResourceCommands.DeleteParameterCommand); 1245.SingleOrDefault(a => a.Name == KnownResourceCommands.SetParameterCommand);
ResourceCommandAnnotationTests.cs (8)
62var startCommand = resourceBuilder.Resource.Annotations.OfType<ResourceCommandAnnotation>().Single(a => a.Name == commandName); 89var restartCommand = resourceBuilder.Resource.Annotations.OfType<ResourceCommandAnnotation>().Single(a => a.Name == KnownResourceCommands.RestartCommand); 104var restartCommand = projectResource.Annotations.OfType<ResourceCommandAnnotation>().Single(a => a.Name == KnownResourceCommands.RestartCommand); 119var restartCommand = csharpAppResource.Annotations.OfType<ResourceCommandAnnotation>().Single(a => a.Name == KnownResourceCommands.RestartCommand); 143var rebuildCommand = projectResource.Annotations.OfType<ResourceCommandAnnotation>().Single(a => a.Name == commandName); 170Assert.DoesNotContain(containerResource.Resource.Annotations.OfType<ResourceCommandAnnotation>(), a => a.Name == KnownResourceCommands.RebuildCommand); 171Assert.Contains(projectResource.Annotations.OfType<ResourceCommandAnnotation>(), a => a.Name == KnownResourceCommands.RebuildCommand); 180var rebuildCommand = projectResource.Annotations.OfType<ResourceCommandAnnotation>().Single(a => a.Name == KnownResourceCommands.RebuildCommand);
WithHttpCommandTests.cs (4)
211Assert.Equal($"{resourceBuilder.Resource.Name}-http-http-post-/some-path", command.Name); 243Assert.Equal("my-command-name", command.Name); 416var command2 = commands.FirstOrDefault(c => c.DisplayName == "Do The Thing" && c.Name.Contains("custom-endpoint")); 418var command4 = commands.FirstOrDefault(c => c.DisplayName == "Do The Get Thing" && c.Name.Contains("custom-endpoint"));
WithProcessCommandTests.cs (2)
73Assert.Equal("my-command", command.Name); 113Assert.Equal("export-command", command.Name);
Aspire.Hosting.TestUtilities (1)
Utils\TerminalCommandTestHelpers.cs (1)
21var command = Assert.Single(resource.Annotations.OfType<ResourceCommandAnnotation>(), command => command.Name == commandName);
Aspire.Hosting.Valkey.Tests (1)
tests\Shared\ContainerReplCommandTestBase.cs (1)
34Assert.Equal("repl", commands[0].Name);