19 references to StopCommand
Aspire.Dashboard (4)
Components\Layout\ResourcesLayout.razor.cs (2)
1880KnownResourceState.Running => [CommandViewModel.StopCommand, CommandViewModel.RestartCommand], 1898c.Name is not (CommandViewModel.StartCommand or CommandViewModel.StopCommand or CommandViewModel.RestartCommand))
Model\DashboardCommandExecutor.cs (1)
54if (dashboardClient.IsReadOnly || commandName is not (CommandViewModel.StopCommand or CommandViewModel.StartCommand))
Model\ResourceViewModel.cs (1)
313private static readonly string[] s_knownResourceCommands = [StartCommand, StopCommand, RestartCommand, RebuildCommand, SetParameterCommand, DeleteParameterCommand];
Aspire.Dashboard.Components.Tests (4)
Layout\ResourcesLayoutTests.cs (4)
1617new(CommandViewModel.StopCommand, state, "Stop", "", confirmationMessage: "", argumentInputs: [], isHighlighted: true, iconName: "", iconVariant: IconVariant.Regular); 1752Command(CommandViewModel.StopCommand, CommandViewModelState.Enabled, true), 1790Command(CommandViewModel.StopCommand, CommandViewModelState.Enabled, false), 1895Command(CommandViewModel.StopCommand, CommandViewModelState.Enabled),
Aspire.Dashboard.Tests (11)
Model\DashboardCommandExecutorTests.cs (10)
45[InlineData(CommandViewModel.StopCommand, true)] 73var resource = ModelTestHelpers.CreateResource(resourceName: "api", commands: [CreateCommand(CommandViewModel.StopCommand)]); 75Assert.False(await executor.ExecuteGraphGameCommandAsync(resource, CommandViewModel.StopCommand, r => r.DisplayName)); 84var resource = ModelTestHelpers.CreateResource(resourceName: "api", commands: [CreateCommand(CommandViewModel.StopCommand)]); 86Assert.False(await executor.ExecuteGraphGameCommandAsync(resource, CommandViewModel.StopCommand, r => r.DisplayName)); 103var resource = ModelTestHelpers.CreateResource(resourceName: "api", commands: [CreateCommand(CommandViewModel.StopCommand, state, confirmationMessage)]); 105Assert.Null(await executor.ExecuteGraphGameCommandAsync(resource, CommandViewModel.StopCommand, r => r.DisplayName)); 123var resource = ModelTestHelpers.CreateResource(resourceName: "api", commands: [CreateCommand(CommandViewModel.StopCommand)]); 125Assert.Null(await executor.ExecuteGraphGameCommandAsync(resource, CommandViewModel.StopCommand, r => r.DisplayName)); 136Assert.Null(await executor.ExecuteGraphGameCommandAsync(resource, CommandViewModel.StopCommand, r => r.DisplayName));
Model\ResourceMenuBuilderTests.cs (1)
420CommandViewModel.StopCommand,