3 instantiations of CommandViewModel
Aspire.Dashboard (1)
ResourceService\Partials.cs (1)
110.Select(c => new CommandViewModel(c.Name, MapState(c.State), c.DisplayName, c.DisplayDescription, c.ConfirmationMessage, c.Parameter, c.IsHighlighted, c.IconName, MapIconVariant(c.IconVariant)))
Aspire.Dashboard.Components.Tests (2)
Pages\ConsoleLogsTests.cs (2)
295commands: [new CommandViewModel("test-name", CommandViewModelState.Enabled, "test-displayname", "test-displaydescription", confirmationMessage: "", parameter: null, isHighlighted: true, iconName: string.Empty, iconVariant: IconVariant.Regular)]); 359commands: [new CommandViewModel("test-name", CommandViewModelState.Enabled, "test-displayname", "test-displaydescription", confirmationMessage: "", parameter: null, isHighlighted: true, iconName: string.Empty, iconVariant: IconVariant.Regular)]);
27 references to CommandViewModel
Aspire.Dashboard (18)
Components\Controls\ResourceActions.razor.cs (3)
37public required EventCallback<CommandViewModel> CommandSelected { get; set; } 40public required Func<ResourceViewModel, CommandViewModel, bool> IsCommandExecuting { get; set; } 60private readonly List<CommandViewModel> _highlightedCommands = new();
Components\Pages\ConsoleLogs.razor.cs (3)
113private readonly List<CommandViewModel> _highlightedCommands = new(); 367EventCallback.Factory.Create<CommandViewModel>(this, ExecuteResourceCommandAsync), 384private async Task ExecuteResourceCommandAsync(CommandViewModel command)
Components\Pages\Resources.razor.cs (3)
466foreach (var command in kvp.Value.Commands) 544EventCallback.Factory.Create<CommandViewModel>(this, (command) => ExecuteResourceCommandAsync(resource, command)), 646private async Task ExecuteResourceCommandAsync(ResourceViewModel resource, CommandViewModel command)
Model\DashboardCommandExecutor.cs (2)
35public async Task ExecuteAsync(ResourceViewModel resource, CommandViewModel command, Func<ResourceViewModel, string> getResourceName) 87public async Task ExecuteAsyncCore(ResourceViewModel resource, CommandViewModel command, Func<ResourceViewModel, string> getResourceName)
Model\ResourceMenuItems.cs (3)
33EventCallback<CommandViewModel> commandSelected, 34Func<ResourceViewModel, CommandViewModel, bool> isCommandExecuting, 116foreach (var command in menuCommands)
Model\ResourceViewModel.cs (1)
40public required ImmutableArray<CommandViewModel> Commands { get; init; }
ResourceService\DashboardClient.cs (1)
543public async Task<ResourceCommandResponseViewModel> ExecuteResourceCommandAsync(string resourceName, string resourceType, CommandViewModel command, CancellationToken cancellationToken)
ResourceService\IDashboardClient.cs (1)
56Task<ResourceCommandResponseViewModel> ExecuteResourceCommandAsync(string resourceName, string resourceType, CommandViewModel command, CancellationToken cancellationToken);
ResourceService\Partials.cs (1)
107ImmutableArray<CommandViewModel> GetCommands()
Aspire.Dashboard.Components.Tests (3)
Controls\ApplicationNameTests.cs (1)
79public Task<ResourceCommandResponseViewModel> ExecuteResourceCommandAsync(string resourceName, string resourceType, CommandViewModel command, CancellationToken cancellationToken) => throw new NotImplementedException();
Shared\TestDashboardClient.cs (1)
41public Task<ResourceCommandResponseViewModel> ExecuteResourceCommandAsync(string resourceName, string resourceType, CommandViewModel command, CancellationToken cancellationToken)
tests\Shared\DashboardModel\ModelTestHelpers.cs (1)
23ImmutableArray<CommandViewModel>? commands = null,
Aspire.Dashboard.Tests (6)
Integration\Playwright\Infrastructure\MockDashboardClient.cs (1)
35public Task<ResourceCommandResponseViewModel> ExecuteResourceCommandAsync(string resourceName, string resourceType, CommandViewModel command, CancellationToken cancellationToken) => throw new NotImplementedException();
Model\ResourceMenuItemsTests.cs (3)
40EventCallback<CommandViewModel>.Empty, 91EventCallback<CommandViewModel>.Empty, 142EventCallback<CommandViewModel>.Empty,
ResourceOutgoingPeerResolverTests.cs (1)
227public Task<ResourceCommandResponseViewModel> ExecuteResourceCommandAsync(string resourceName, string resourceType, CommandViewModel command, CancellationToken cancellationToken) => throw new NotImplementedException();
tests\Shared\DashboardModel\ModelTestHelpers.cs (1)
23ImmutableArray<CommandViewModel>? commands = null,