3 instantiations of CommandViewModel
Aspire.Dashboard (1)
ServiceClient\Partials.cs (1)
112
.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)
551
commands: [new
CommandViewModel
("test-name", CommandViewModelState.Enabled, "test-displayname", "test-displaydescription", confirmationMessage: "", parameter: null, isHighlighted: true, iconName: string.Empty, iconVariant: IconVariant.Regular)]);
615
commands: [new
CommandViewModel
("test-name", CommandViewModelState.Enabled, "test-displayname", "test-displaydescription", confirmationMessage: "", parameter: null, isHighlighted: true, iconName: string.Empty, iconVariant: IconVariant.Regular)]);
31 references to CommandViewModel
Aspire.Dashboard (23)
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();
405
EventCallback.Factory.Create<
CommandViewModel
>(this, ExecuteResourceCommandAsync),
433
private async Task ExecuteResourceCommandAsync(
CommandViewModel
command)
Components\Pages\Resources.razor.cs (3)
503
foreach (
var
command in kvp.Value.Commands)
588
EventCallback.Factory.Create<
CommandViewModel
>(this, (command) => ExecuteResourceCommandAsync(resource, command)),
694
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 (8)
35
EventCallback<
CommandViewModel
> commandSelected,
36
Func<ResourceViewModel,
CommandViewModel
, bool> isCommandExecuting,
180
private static void AddCommandMenuItems(List<MenuButtonItem> menuItems, ResourceViewModel resource, IStringLocalizer<Resources.Resources> loc, IStringLocalizer<Commands> commandsLoc, EventCallback<
CommandViewModel
> commandSelected, Func<ResourceViewModel,
CommandViewModel
, bool> isCommandExecuting)
197
foreach (
var
highlightedCommand in highlightedMenuCommands)
208
foreach (
var
command in otherMenuCommands)
223
foreach (
var
command in otherMenuCommands)
229
MenuButtonItem CreateMenuItem(
CommandViewModel
command)
Model\ResourceViewModel.cs (1)
41
public required ImmutableArray<
CommandViewModel
> Commands { get; init; }
ServiceClient\DashboardClient.cs (1)
729
public async Task<ResourceCommandResponseViewModel> ExecuteResourceCommandAsync(string resourceName, string resourceType,
CommandViewModel
command, CancellationToken cancellationToken)
ServiceClient\IDashboardClient.cs (1)
67
Task<ResourceCommandResponseViewModel> ExecuteResourceCommandAsync(string resourceName, string resourceType,
CommandViewModel
command, CancellationToken cancellationToken);
ServiceClient\Partials.cs (1)
109
ImmutableArray<
CommandViewModel
> GetCommands()
Aspire.Dashboard.Components.Tests (2)
Shared\TestDashboardClient.cs (1)
50
public Task<ResourceCommandResponseViewModel> ExecuteResourceCommandAsync(string resourceName, string resourceType,
CommandViewModel
command, CancellationToken cancellationToken)
tests\Shared\DashboardModel\ModelTestHelpers.cs (1)
24
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)
413
public Task<ResourceCommandResponseViewModel> ExecuteResourceCommandAsync(string resourceName, string resourceType,
CommandViewModel
command, CancellationToken cancellationToken) => throw new NotImplementedException();
tests\Shared\DashboardModel\ModelTestHelpers.cs (1)
24
ImmutableArray<
CommandViewModel
>? commands = null,