29 instantiations of ResourceSnapshotCommand
Aspire.Cli.Tests (29)
Backchannel\ResourceSnapshotMapperTests.cs (19)
49
new
ResourceSnapshotCommand
78
new
ResourceSnapshotCommand
{ Name = "start", State = "Disabled", Description = "Start" },
79
new
ResourceSnapshotCommand
{ Name = "save", State = "Hidden", Description = "Save parameter" },
80
new
ResourceSnapshotCommand
{ Name = "dashboard-only", State = "Enabled", Description = "UI only", Visibility = KnownCommandVisibility.UI },
81
new
ResourceSnapshotCommand
{ Name = "missing-visibility", State = "Enabled", Description = "Missing visibility", Visibility = null! }
141
new
ResourceSnapshotCommand
{ Name = "restart", State = KnownCommandState.Enabled, Description = "Restart" },
142
new
ResourceSnapshotCommand
{ Name = "start", State = KnownCommandState.Disabled, Description = "Start" },
143
new
ResourceSnapshotCommand
{ Name = "save", State = KnownCommandState.Hidden, Description = "Save parameter" }
165
new
ResourceSnapshotCommand
{ Name = "api-only", State = KnownCommandState.Enabled, Description = "API only", Visibility = KnownCommandVisibility.Api },
166
new
ResourceSnapshotCommand
{ Name = "ui-only", State = KnownCommandState.Enabled, Description = "UI only", Visibility = KnownCommandVisibility.UI },
167
new
ResourceSnapshotCommand
{ Name = "ui-disabled", State = KnownCommandState.Disabled, Description = "UI disabled", Visibility = KnownCommandVisibility.UI }
191
new
ResourceSnapshotCommand
{ Name = "set-parameter", State = KnownCommandState.Enabled, Description = "Set", Visibility = KnownCommandVisibility.Api },
192
new
ResourceSnapshotCommand
{ Name = "custom-action", State = KnownCommandState.Enabled, Description = "Custom", Visibility = KnownCommandVisibility.Api },
193
new
ResourceSnapshotCommand
{ Name = "delete-parameter", State = KnownCommandState.Enabled, Description = "Delete", Visibility = KnownCommandVisibility.Api }
219
new
ResourceSnapshotCommand
{ Name = "set-parameter", State = KnownCommandState.Enabled, Description = "Set", Visibility = KnownCommandVisibility.Api },
220
new
ResourceSnapshotCommand
{ Name = "custom-action", State = KnownCommandState.Enabled, Description = "Custom", Visibility = KnownCommandVisibility.Api },
221
new
ResourceSnapshotCommand
{ Name = "delete-parameter", State = KnownCommandState.Enabled, Description = "Delete", Visibility = KnownCommandVisibility.Api }
246
new
ResourceSnapshotCommand
289
new
ResourceSnapshotCommand
Commands\DescribeCommandTests.cs (2)
479
new
ResourceSnapshotCommand
486
new
ResourceSnapshotCommand
Commands\ResourceCommandTests.cs (1)
2391
return new
ResourceSnapshotCommand
Mcp\ListResourcesToolTests.cs (7)
511
new
ResourceSnapshotCommand
554
new
ResourceSnapshotCommand
{ Name = "disabled", State = "disabled", Visibility = "api" },
555
new
ResourceSnapshotCommand
{ Name = "hidden", State = "Hidden" },
556
new
ResourceSnapshotCommand
{ Name = "ui-only", State = "Enabled", Visibility = "UI" },
557
new
ResourceSnapshotCommand
{ Name = "none", State = "Enabled", Visibility = "None" }
572
var commands = Enumerable.Range(0, 40).Select(index => new
ResourceSnapshotCommand
947
new
ResourceSnapshotCommand
12 references to ResourceSnapshotCommand
aspire (7)
Backchannel\ResourceSnapshotMapper.cs (1)
226
internal static bool IsCommandAvailableToApi(
ResourceSnapshotCommand
command)
Commands\ResourceCommand.cs (5)
144
var
command = await GetCommandMetadataAsync(connection, resourceName, commandName, includeHidden, cancellationToken).ConfigureAwait(false);
223
private static async Task<
ResourceSnapshotCommand
?> GetCommandMetadataAsync(IAppHostAuxiliaryBackchannel connection, string resourceName, string commandName, bool includeHidden, CancellationToken cancellationToken)
255
private static (JsonNode? Arguments, string? ErrorMessage) CreateCommandArguments(
ResourceSnapshotCommand
? command, string[] capturedArguments, CommandArgumentParseMode parseMode)
631
var
resourceCommand = await GetCommandMetadataAsync(result.Connection!, request.ResourceName, request.CommandName, includeHidden, cancellationToken).ConfigureAwait(false);
755
private static void WriteResourceCommandHelp(TextWriter writer, System.CommandLine.Parsing.CommandResult commandResult, string resourceName,
ResourceSnapshotCommand
command)
src\Aspire.Hosting\Backchannel\BackchannelDataTypes.cs (1)
1197
public
ResourceSnapshotCommand
[] Commands { get; init; } = [];
Aspire.Cli.Tests (5)
Commands\ResourceCommandTests.cs (5)
2342
private static ResourceSnapshot CreateResourceSnapshot(string name, params
ResourceSnapshotCommand
[] commands)
2347
private static ResourceSnapshot CreateResourceSnapshot(string name, string state, params
ResourceSnapshotCommand
[] commands)
2379
private static
ResourceSnapshotCommand
CreateCommand(string name, params ResourceSnapshotCommandArgument[] argumentInputs)
2384
private static
ResourceSnapshotCommand
CreateCommand(string name, string? description, params ResourceSnapshotCommandArgument[] argumentInputs)
2389
private static
ResourceSnapshotCommand
CreateCommand(string name, string? description, string state, string? visibility, params ResourceSnapshotCommandArgument[] argumentInputs)