72 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)
206if (executionContext.IsRunMode && interactionService.IsAvailable && !parameterResource.Annotations.OfType<ResourceCommandAnnotation>().Any(a => a.Name.Equals(KnownResourceCommands.SetParameterCommand, StringComparisons.CommandName))) 372name: KnownResourceCommands.SetParameterCommand, 408name: KnownResourceCommands.DeleteParameterCommand,
Aspire.Hosting.Dotnet.Tests (6)
DotnetProjectBuildCoordinatorTests.cs (2)
1023KnownResourceCommands.RebuildCommand, 4327KnownResourceCommands.RebuildCommand,
DotnetProjectResourceTests.cs (4)
573var restartCommand = resource.Annotations.OfType<ResourceCommandAnnotation>().Single(a => a.Name == KnownResourceCommands.RestartCommand); 589annotation => annotation.Name == KnownResourceCommands.RebuildCommand); 601var restartCommand = resource.Annotations.OfType<ResourceCommandAnnotation>().Single(a => a.Name == KnownResourceCommands.RestartCommand); 604Assert.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)
218KnownResourceCommands.StartCommand,
TestServices\TestEfTool.cs (1)
25KnownResourceCommands.StartCommand,
Aspire.Hosting.Maui (3)
Lifecycle\MauiBuildQueueEventSubscriber.cs (3)
456var result = await resourceCommandService.ExecuteCommandAsync(resource, KnownResourceCommands.StopCommand, stopCancellationToken).ConfigureAwait(false); 512.SingleOrDefault(a => a.Name == KnownResourceCommands.StopCommand); 525name: KnownResourceCommands.StopCommand,
Aspire.Hosting.Maui.Tests (3)
MauiBuildQueueTests.cs (3)
592.Single(a => a.Name == KnownResourceCommands.StopCommand); 625.Single(a => a.Name == KnownResourceCommands.StopCommand); 1145name: KnownResourceCommands.StopCommand,
Aspire.Hosting.Redis.Tests (2)
RedisFunctionalTests.cs (2)
173var startResult = await app.ResourceCommands.ExecuteCommandAsync(commanderBuilder.Resource, KnownResourceCommands.StartCommand); 192var stopResult = await app.ResourceCommands.ExecuteCommandAsync(commanderBuilder.Resource, KnownResourceCommands.StopCommand);
Aspire.Hosting.Tests (35)
AddParameterTests.cs (1)
135var start = Assert.Single(caller.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == KnownResourceCommands.StartCommand);
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)
12745a => Assert.Equal(KnownResourceCommands.StartCommand, a.Name), 12746a => Assert.Equal(KnownResourceCommands.StopCommand, a.Name), 12747a => Assert.Equal(KnownResourceCommands.RestartCommand, a.Name)); 12754a => Assert.Equal(KnownResourceCommands.StartCommand, a.Name), 12755a => Assert.Equal(KnownResourceCommands.StopCommand, a.Name), 12756a => Assert.Equal(KnownResourceCommands.RestartCommand, a.Name), 12757a => Assert.Equal(KnownResourceCommands.RebuildCommand, a.Name));
Eventing\DistributedApplicationBuilderEventingTests.cs (1)
393await app.ResourceCommands.ExecuteCommandAsync("redis", KnownResourceCommands.StopCommand);
Orchestrator\ApplicationOrchestratorTests.cs (1)
1561var start = Assert.Single(caller.Resource.Annotations.OfType<ResourceCommandAnnotation>(), c => c.Name == KnownResourceCommands.StartCommand);
Orchestrator\ParameterProcessorTests.cs (8)
1038Assert.Equal(KnownResourceCommands.SetParameterCommand, setValueCommand.Name); 1056.Single(a => a.Name == KnownResourceCommands.SetParameterCommand); 1087.Single(a => a.Name == KnownResourceCommands.SetParameterCommand); 1112.Single(a => a.Name == KnownResourceCommands.SetParameterCommand); 1146.Single(a => a.Name == KnownResourceCommands.SetParameterCommand); 1184.Single(a => a.Name == KnownResourceCommands.DeleteParameterCommand); 1216.Single(a => a.Name == KnownResourceCommands.DeleteParameterCommand); 1244.SingleOrDefault(a => a.Name == KnownResourceCommands.SetParameterCommand);
ResourceCommandAnnotationTests.cs (6)
92var restartCommand = resourceBuilder.Resource.Annotations.OfType<ResourceCommandAnnotation>().Single(a => a.Name == KnownResourceCommands.RestartCommand); 107var restartCommand = projectResource.Annotations.OfType<ResourceCommandAnnotation>().Single(a => a.Name == KnownResourceCommands.RestartCommand); 122var restartCommand = csharpAppResource.Annotations.OfType<ResourceCommandAnnotation>().Single(a => a.Name == KnownResourceCommands.RestartCommand); 173Assert.DoesNotContain(containerResource.Resource.Annotations.OfType<ResourceCommandAnnotation>(), a => a.Name == KnownResourceCommands.RebuildCommand); 174Assert.Contains(projectResource.Annotations.OfType<ResourceCommandAnnotation>(), a => a.Name == KnownResourceCommands.RebuildCommand); 183var rebuildCommand = projectResource.Annotations.OfType<ResourceCommandAnnotation>().Single(a => a.Name == KnownResourceCommands.RebuildCommand);
ResourceCommandServiceTests.cs (5)
416custom.WithCommand(name: KnownResourceCommands.StartCommand, 437custom.WithCommand(name: KnownResourceCommands.StopCommand, 1767var result = await app.ResourceCommands.ExecuteCommandAsync(project.Resource, KnownResourceCommands.RebuildCommand).DefaultTimeout(TimeSpan.FromMinutes(2)); 1776var secondResult = await app.ResourceCommands.ExecuteCommandAsync(project.Resource, KnownResourceCommands.RebuildCommand).DefaultTimeout(TimeSpan.FromMinutes(2)); 1835var result = await app.ResourceCommands.ExecuteCommandAsync(project.Resource, KnownResourceCommands.RebuildCommand).DefaultTimeout(TimeSpan.FromMinutes(2));
WithUrlsTests.cs (2)
1220var startResult = await app.ResourceCommands.ExecuteCommandAsync(resourceA.Resource, KnownResourceCommands.StartCommand).DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout); 1231var stopResult = await app.ResourceCommands.ExecuteCommandAsync(resourceA.Resource, KnownResourceCommands.StopCommand).DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout);
Stress.AppHost (2)
CommandResources.cs (2)
1188await ExecuteCommandForAllResourcesAsync(c.Services, KnownResourceCommands.StopCommand, c.CancellationToken); 1197await ExecuteCommandForAllResourcesAsync(c.Services, KnownResourceCommands.StartCommand, c.CancellationToken);