3 instantiations of CommandViewModel
Aspire.Dashboard (1)
ServiceClient\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)
444
commands: [new
CommandViewModel
("test-name", CommandViewModelState.Enabled, "test-displayname", "test-displaydescription", confirmationMessage: "", parameter: null, isHighlighted: true, iconName: string.Empty, iconVariant: IconVariant.Regular)]);
508
commands: [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)
37
public required EventCallback<
CommandViewModel
> CommandSelected { get; set; }
40
public required Func<ResourceViewModel,
CommandViewModel
, bool> IsCommandExecuting { get; set; }
60
private readonly List<
CommandViewModel
> _highlightedCommands = new();
Components\Pages\ConsoleLogs.razor.cs (3)
113
private readonly List<
CommandViewModel
> _highlightedCommands = new();
403
EventCallback.Factory.Create<
CommandViewModel
>(this, ExecuteResourceCommandAsync),
430
private async Task ExecuteResourceCommandAsync(
CommandViewModel
command)
Components\Pages\Resources.razor.cs (3)
498
foreach (
var
command in kvp.Value.Commands)
576
EventCallback.Factory.Create<
CommandViewModel
>(this, (command) => ExecuteResourceCommandAsync(resource, command)),
678
private async Task ExecuteResourceCommandAsync(ResourceViewModel resource,
CommandViewModel
command)
Model\DashboardCommandExecutor.cs (2)
35
public async Task ExecuteAsync(ResourceViewModel resource,
CommandViewModel
command, Func<ResourceViewModel, string> getResourceName)
87
public async Task ExecuteAsyncCore(ResourceViewModel resource,
CommandViewModel
command, Func<ResourceViewModel, string> getResourceName)
Model\ResourceMenuItems.cs (3)
33
EventCallback<
CommandViewModel
> commandSelected,
34
Func<ResourceViewModel,
CommandViewModel
, bool> isCommandExecuting,
116
foreach (
var
command in menuCommands)
Model\ResourceViewModel.cs (1)
40
public required ImmutableArray<
CommandViewModel
> Commands { get; init; }
ServiceClient\DashboardClient.cs (1)
719
public async Task<ResourceCommandResponseViewModel> ExecuteResourceCommandAsync(string resourceName, string resourceType,
CommandViewModel
command, CancellationToken cancellationToken)
ServiceClient\IDashboardClient.cs (1)
62
Task<ResourceCommandResponseViewModel> ExecuteResourceCommandAsync(string resourceName, string resourceType,
CommandViewModel
command, CancellationToken cancellationToken);
ServiceClient\Partials.cs (1)
107
ImmutableArray<
CommandViewModel
> GetCommands()
Aspire.Dashboard.Components.Tests (3)
Controls\ApplicationNameTests.cs (1)
80
public Task<ResourceCommandResponseViewModel> ExecuteResourceCommandAsync(string resourceName, string resourceType,
CommandViewModel
command, CancellationToken cancellationToken) => throw new NotImplementedException();
Shared\TestDashboardClient.cs (1)
48
public Task<ResourceCommandResponseViewModel> ExecuteResourceCommandAsync(string resourceName, string resourceType,
CommandViewModel
command, CancellationToken cancellationToken)
tests\Shared\DashboardModel\ModelTestHelpers.cs (1)
23
ImmutableArray<
CommandViewModel
>? commands = null,
Aspire.Dashboard.Tests (6)
Integration\Playwright\Infrastructure\MockDashboardClient.cs (1)
36
public Task<ResourceCommandResponseViewModel> ExecuteResourceCommandAsync(string resourceName, string resourceType,
CommandViewModel
command, CancellationToken cancellationToken) => throw new NotImplementedException();
Model\ResourceMenuItemsTests.cs (3)
40
EventCallback<
CommandViewModel
>.Empty,
91
EventCallback<
CommandViewModel
>.Empty,
142
EventCallback<
CommandViewModel
>.Empty,
ResourceOutgoingPeerResolverTests.cs (1)
228
public Task<ResourceCommandResponseViewModel> ExecuteResourceCommandAsync(string resourceName, string resourceType,
CommandViewModel
command, CancellationToken cancellationToken) => throw new NotImplementedException();
tests\Shared\DashboardModel\ModelTestHelpers.cs (1)
23
ImmutableArray<
CommandViewModel
>? commands = null,