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)
295
commands: [new
CommandViewModel
("test-name", CommandViewModelState.Enabled, "test-displayname", "test-displaydescription", confirmationMessage: "", parameter: null, isHighlighted: true, iconName: string.Empty, iconVariant: IconVariant.Regular)]);
359
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();
367
EventCallback.Factory.Create<
CommandViewModel
>(this, ExecuteResourceCommandAsync),
384
private async Task ExecuteResourceCommandAsync(
CommandViewModel
command)
Components\Pages\Resources.razor.cs (3)
466
foreach (
var
command in kvp.Value.Commands)
544
EventCallback.Factory.Create<
CommandViewModel
>(this, (command) => ExecuteResourceCommandAsync(resource, command)),
646
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; }
ResourceService\DashboardClient.cs (1)
543
public async Task<ResourceCommandResponseViewModel> ExecuteResourceCommandAsync(string resourceName, string resourceType,
CommandViewModel
command, CancellationToken cancellationToken)
ResourceService\IDashboardClient.cs (1)
56
Task<ResourceCommandResponseViewModel> ExecuteResourceCommandAsync(string resourceName, string resourceType,
CommandViewModel
command, CancellationToken cancellationToken);
ResourceService\Partials.cs (1)
107
ImmutableArray<
CommandViewModel
> GetCommands()
Aspire.Dashboard.Components.Tests (3)
Controls\ApplicationNameTests.cs (1)
79
public Task<ResourceCommandResponseViewModel> ExecuteResourceCommandAsync(string resourceName, string resourceType,
CommandViewModel
command, CancellationToken cancellationToken) => throw new NotImplementedException();
Shared\TestDashboardClient.cs (1)
41
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)
35
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)
227
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,