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