3 instantiations of CommandViewModel
Aspire.Dashboard (1)
ServiceClient\Partials.cs (1)
119.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)
553commands: [new CommandViewModel("test-name", CommandViewModelState.Enabled, "test-displayname", "test-displaydescription", confirmationMessage: "", parameter: null, isHighlighted: true, iconName: string.Empty, iconVariant: IconVariant.Regular)]); 617commands: [new CommandViewModel("test-name", CommandViewModelState.Enabled, "test-displayname", "test-displaydescription", confirmationMessage: "", parameter: null, isHighlighted: true, iconName: string.Empty, iconVariant: IconVariant.Regular)]);
38 references to CommandViewModel
Aspire.Dashboard (29)
Components\Controls\ResourceActions.razor.cs (3)
50public required EventCallback<CommandViewModel> CommandSelected { get; set; } 53public required Func<ResourceViewModel, CommandViewModel, bool> IsCommandExecuting { get; set; } 73private readonly List<CommandViewModel> _highlightedCommands = new();
Components\Pages\ConsoleLogs.razor.cs (3)
163private readonly List<CommandViewModel> _highlightedCommands = new(); 519EventCallback.Factory.Create<CommandViewModel>(this, ExecuteResourceCommandAsync), 559private async Task ExecuteResourceCommandAsync(CommandViewModel command)
Components\Pages\Resources.razor.cs (3)
535foreach (var command in kvp.Value.Commands) 623EventCallback.Factory.Create<CommandViewModel>(this, (command) => ExecuteResourceCommandAsync(resource, command)), 730private async Task ExecuteResourceCommandAsync(ResourceViewModel resource, CommandViewModel command)
Components_Controls_ResourceActions_razor.g.cs (1)
192var highlightedCommand = _highlightedCommands[i];
Components_Pages_ConsoleLogs_razor.g.cs (1)
507foreach (var command in _highlightedCommands)
Components_Pages_Resources_razor.g.cs (3)
2402), global::Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck<global::Microsoft.AspNetCore.Components.EventCallback<global::Aspire.Dashboard.Model.CommandViewModel>>(global::Microsoft.AspNetCore.Components.EventCallback.Factory.Create<global::Aspire.Dashboard.Model.CommandViewModel>(this, 2419), (global::System.Func<global::Aspire.Dashboard.Model.ResourceViewModel, global::Aspire.Dashboard.Model.CommandViewModel, global::System.Boolean>)(
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 (8)
42EventCallback<CommandViewModel> commandSelected, 43Func<ResourceViewModel, CommandViewModel, bool> isCommandExecuting, 205private static void AddCommandMenuItems(List<MenuButtonItem> menuItems, ResourceViewModel resource, IStringLocalizer<Resources.Resources> loc, IStringLocalizer<Commands> commandsLoc, EventCallback<CommandViewModel> commandSelected, Func<ResourceViewModel, CommandViewModel, bool> isCommandExecuting, IconResolver iconResolver) 222foreach (var highlightedCommand in highlightedMenuCommands) 233foreach (var command in otherMenuCommands) 248foreach (var command in otherMenuCommands) 254MenuButtonItem CreateMenuItem(CommandViewModel command)
Model\ResourceViewModel.cs (1)
40public required ImmutableArray<CommandViewModel> Commands { get; init; }
ServiceClient\DashboardClient.cs (1)
722public async Task<ResourceCommandResponseViewModel> ExecuteResourceCommandAsync(string resourceName, string resourceType, CommandViewModel command, CancellationToken cancellationToken)
ServiceClient\IDashboardClient.cs (1)
67Task<ResourceCommandResponseViewModel> ExecuteResourceCommandAsync(string resourceName, string resourceType, CommandViewModel command, CancellationToken cancellationToken);
ServiceClient\Partials.cs (1)
116ImmutableArray<CommandViewModel> GetCommands()
Telemetry\TelemetryPropertyValues.cs (1)
15return CommandViewModel.IsKnownCommand(commandName)
Aspire.Dashboard.Components.Tests (2)
tests\Shared\DashboardModel\ModelTestHelpers.cs (1)
24ImmutableArray<CommandViewModel>? commands = null,
tests\Shared\TestDashboardClient.cs (1)
50public Task<ResourceCommandResponseViewModel> ExecuteResourceCommandAsync(string resourceName, string resourceType, CommandViewModel command, CancellationToken cancellationToken)
Aspire.Dashboard.Tests (7)
Integration\Playwright\Infrastructure\MockDashboardClient.cs (1)
43public Task<ResourceCommandResponseViewModel> ExecuteResourceCommandAsync(string resourceName, string resourceType, CommandViewModel command, CancellationToken cancellationToken) => throw new NotImplementedException();
Model\ResourceMenuItemsTests.cs (3)
46EventCallback<CommandViewModel>.Empty, 102EventCallback<CommandViewModel>.Empty, 158EventCallback<CommandViewModel>.Empty,
ResourceOutgoingPeerResolverTests.cs (1)
418public Task<ResourceCommandResponseViewModel> ExecuteResourceCommandAsync(string resourceName, string resourceType, CommandViewModel command, CancellationToken cancellationToken) => throw new NotImplementedException();
tests\Shared\DashboardModel\ModelTestHelpers.cs (1)
24ImmutableArray<CommandViewModel>? commands = null,
tests\Shared\TestDashboardClient.cs (1)
50public Task<ResourceCommandResponseViewModel> ExecuteResourceCommandAsync(string resourceName, string resourceType, CommandViewModel command, CancellationToken cancellationToken)