23 references to KnownCommandState
aspire (5)
Backchannel\ResourceSnapshotMapper.cs (2)
256return string.Equals(state, KnownCommandState.Enabled, StringComparison.OrdinalIgnoreCase) 257|| (includeDisabledCommands && string.Equals(state, KnownCommandState.Disabled, StringComparison.OrdinalIgnoreCase));
Mcp\Tools\ListResourcesTool.cs (3)
313State = string.Equals(command.State, KnownCommandState.Enabled, StringComparison.OrdinalIgnoreCase) 314? KnownCommandState.Enabled 315: KnownCommandState.Disabled,
Aspire.Cli.Tests (18)
Backchannel\ResourceSnapshotMapperTests.cs (15)
174new ResourceSnapshotCommand { Name = "restart", State = KnownCommandState.Enabled, Description = "Restart" }, 175new ResourceSnapshotCommand { Name = "start", State = KnownCommandState.Disabled, Description = "Start" }, 176new ResourceSnapshotCommand { Name = "save", State = KnownCommandState.Hidden, Description = "Save parameter" } 183Assert.Equal(KnownCommandState.Enabled, result.Commands["restart"].State); 184Assert.Equal(KnownCommandState.Disabled, result.Commands["start"].State); 198new ResourceSnapshotCommand { Name = "api-only", State = KnownCommandState.Enabled, Description = "API only", Visibility = KnownCommandVisibility.Api }, 199new ResourceSnapshotCommand { Name = "ui-only", State = KnownCommandState.Enabled, Description = "UI only", Visibility = KnownCommandVisibility.UI }, 200new ResourceSnapshotCommand { Name = "ui-disabled", State = KnownCommandState.Disabled, Description = "UI disabled", Visibility = KnownCommandVisibility.UI } 224new ResourceSnapshotCommand { Name = "set-parameter", State = KnownCommandState.Enabled, Description = "Set", Visibility = KnownCommandVisibility.Api }, 225new ResourceSnapshotCommand { Name = "custom-action", State = KnownCommandState.Enabled, Description = "Custom", Visibility = KnownCommandVisibility.Api }, 226new ResourceSnapshotCommand { Name = "delete-parameter", State = KnownCommandState.Enabled, Description = "Delete", Visibility = KnownCommandVisibility.Api } 252new ResourceSnapshotCommand { Name = "set-parameter", State = KnownCommandState.Enabled, Description = "Set", Visibility = KnownCommandVisibility.Api }, 253new ResourceSnapshotCommand { Name = "custom-action", State = KnownCommandState.Enabled, Description = "Custom", Visibility = KnownCommandVisibility.Api }, 254new ResourceSnapshotCommand { Name = "delete-parameter", State = KnownCommandState.Enabled, Description = "Delete", Visibility = KnownCommandVisibility.Api } 282State = KnownCommandState.Enabled,
Commands\DescribeCommandTests.cs (3)
593State = KnownCommandState.Enabled, 600State = KnownCommandState.Disabled, 621Assert.Equal(KnownCommandState.Disabled, resource.Commands["repair"].State);