69 references to KnownResourceCommands
Aspire.Hosting (17)
ApplicationModel\CommandsConfigurationExtensions.cs (4)
27name: KnownResourceCommands.StartCommand, 60name: KnownResourceCommands.StopCommand, 99name: KnownResourceCommands.RestartCommand, 154name: KnownResourceCommands.RebuildCommand,
ApplicationModel\ResourceCommandService.cs (10)
23[KnownResourceCommands.LegacyStartCommand] = KnownResourceCommands.StartCommand, 24[KnownResourceCommands.LegacyStopCommand] = KnownResourceCommands.StopCommand, 25[KnownResourceCommands.LegacyRestartCommand] = KnownResourceCommands.RestartCommand, 26[KnownResourceCommands.LegacySetParameterCommand] = KnownResourceCommands.SetParameterCommand, 27[KnownResourceCommands.LegacyDeleteParameterCommand] = KnownResourceCommands.DeleteParameterCommand,
Orchestrator\ParameterProcessor.cs (3)
155if (executionContext.IsRunMode && interactionService.IsAvailable && !parameterResource.Annotations.OfType<ResourceCommandAnnotation>().Any(a => a.Name.Equals(KnownResourceCommands.SetParameterCommand, StringComparisons.CommandName))) 265name: KnownResourceCommands.SetParameterCommand, 301name: KnownResourceCommands.DeleteParameterCommand,
Aspire.Hosting.Dotnet.Tests (6)
DotnetProjectBuildCoordinatorTests.cs (2)
663KnownResourceCommands.RebuildCommand, 3116KnownResourceCommands.RebuildCommand,
DotnetProjectResourceTests.cs (4)
598var restartCommand = resource.Annotations.OfType<ResourceCommandAnnotation>().Single(a => a.Name == KnownResourceCommands.RestartCommand); 614annotation => annotation.Name == KnownResourceCommands.RebuildCommand); 626var restartCommand = resource.Annotations.OfType<ResourceCommandAnnotation>().Single(a => a.Name == KnownResourceCommands.RestartCommand); 629Assert.Contains(resource.Annotations.OfType<ResourceCommandAnnotation>(), a => a.Name == KnownResourceCommands.RebuildCommand);
Aspire.Hosting.EntityFrameworkCore (2)
EFCoreOperationExecutor.cs (2)
467if (toolResource.Annotations.OfType<ResourceCommandAnnotation>().Any(a => a.Name == KnownResourceCommands.StartCommand)) 469return KnownResourceCommands.StartCommand;
Aspire.Hosting.EntityFrameworkCore.Tests (2)
EFCoreOperationExecutorTests.cs (1)
216KnownResourceCommands.StartCommand,
TestServices\TestEfTool.cs (1)
23KnownResourceCommands.StartCommand,
Aspire.Hosting.Maui (3)
Lifecycle\MauiBuildQueueEventSubscriber.cs (3)
452var result = await resourceCommandService.ExecuteCommandAsync(resource, KnownResourceCommands.StopCommand, stopCancellationToken).ConfigureAwait(false); 508.SingleOrDefault(a => a.Name == KnownResourceCommands.StopCommand); 521name: KnownResourceCommands.StopCommand,
Aspire.Hosting.Maui.Tests (3)
MauiBuildQueueTests.cs (3)
569.Single(a => a.Name == KnownResourceCommands.StopCommand); 602.Single(a => a.Name == KnownResourceCommands.StopCommand); 1122name: KnownResourceCommands.StopCommand,
Aspire.Hosting.Redis.Tests (2)
RedisFunctionalTests.cs (2)
175var startResult = await app.ResourceCommands.ExecuteCommandAsync(commanderBuilder.Resource, KnownResourceCommands.StartCommand); 194var stopResult = await app.ResourceCommands.ExecuteCommandAsync(commanderBuilder.Resource, KnownResourceCommands.StopCommand);
Aspire.Hosting.Tests (32)
Dashboard\DashboardEventHandlersTests.cs (4)
219command => Assert.Equal(KnownResourceCommands.StartCommand, command.Name), 220command => Assert.Equal(KnownResourceCommands.StopCommand, command.Name), 221command => Assert.Equal(KnownResourceCommands.RestartCommand, command.Name), 222command => Assert.Equal(KnownResourceCommands.RebuildCommand, command.Name));
Dcp\DcpExecutorTests.cs (7)
10864a => Assert.Equal(KnownResourceCommands.StartCommand, a.Name), 10865a => Assert.Equal(KnownResourceCommands.StopCommand, a.Name), 10866a => Assert.Equal(KnownResourceCommands.RestartCommand, a.Name)); 10873a => Assert.Equal(KnownResourceCommands.StartCommand, a.Name), 10874a => Assert.Equal(KnownResourceCommands.StopCommand, a.Name), 10875a => Assert.Equal(KnownResourceCommands.RestartCommand, a.Name), 10876a => Assert.Equal(KnownResourceCommands.RebuildCommand, a.Name));
Eventing\DistributedApplicationBuilderEventingTests.cs (1)
361await app.ResourceCommands.ExecuteCommandAsync("redis", KnownResourceCommands.StopCommand);
Orchestrator\ParameterProcessorTests.cs (8)
876.SingleOrDefault(a => a.Name == KnownResourceCommands.SetParameterCommand); 896.Single(a => a.Name == KnownResourceCommands.SetParameterCommand); 927.Single(a => a.Name == KnownResourceCommands.SetParameterCommand); 952.Single(a => a.Name == KnownResourceCommands.SetParameterCommand); 986.Single(a => a.Name == KnownResourceCommands.SetParameterCommand); 1024.Single(a => a.Name == KnownResourceCommands.DeleteParameterCommand); 1056.Single(a => a.Name == KnownResourceCommands.DeleteParameterCommand); 1084.SingleOrDefault(a => a.Name == KnownResourceCommands.SetParameterCommand);
ResourceCommandAnnotationTests.cs (6)
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); 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);
ResourceCommandServiceTests.cs (4)
415custom.WithCommand(name: KnownResourceCommands.StartCommand, 436custom.WithCommand(name: KnownResourceCommands.StopCommand, 1756var result = await app.ResourceCommands.ExecuteCommandAsync(project.Resource, KnownResourceCommands.RebuildCommand).DefaultTimeout(TimeSpan.FromMinutes(2)); 1765var secondResult = await app.ResourceCommands.ExecuteCommandAsync(project.Resource, KnownResourceCommands.RebuildCommand).DefaultTimeout(TimeSpan.FromMinutes(2));
WithUrlsTests.cs (2)
1123var startResult = await app.ResourceCommands.ExecuteCommandAsync(resourceA.Resource, KnownResourceCommands.StartCommand).DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout); 1134var stopResult = await app.ResourceCommands.ExecuteCommandAsync(resourceA.Resource, KnownResourceCommands.StopCommand).DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout);
Stress.AppHost (2)
CommandResources.cs (2)
1110await ExecuteCommandForAllResourcesAsync(c.Services, KnownResourceCommands.StopCommand, c.CancellationToken); 1119await ExecuteCommandForAllResourcesAsync(c.Services, KnownResourceCommands.StartCommand, c.CancellationToken);