96 references to Enabled
Aspire.Hosting (10)
ApplicationModel\CommandsConfigurationExtensions.cs (4)
45return ResourceCommandState.Enabled; 78return ResourceCommandState.Enabled; 119return ResourceCommandState.Enabled; 168? ResourceCommandState.Enabled
Dashboard\proto\Partials.cs (1)
174Hosting.ApplicationModel.ResourceCommandState.Enabled => ResourceCommandState.Enabled,
Orchestrator\ParameterProcessor.cs (2)
265updateState: _ => ResourceCommandState.Enabled, 301updateState: _ => HasParameterValue(parameterResource) ? ResourceCommandState.Enabled : ResourceCommandState.Hidden,
ResourceBuilderExtensions.cs (3)
3306return builder.WithAnnotation(new ResourceCommandAnnotation(name, displayName, commandOptions.UpdateState ?? (c => ResourceCommandState.Enabled), executeCommand, commandOptions.Description, commandOptions.Parameter, commandOptions.Arguments, commandOptions.ConfirmationMessage, commandOptions.IconName, commandOptions.IconVariant, commandOptions.IsHighlighted, commandOptions.Visibility, commandOptions.ValidateArguments, commandOptions.Progress)); 3372return builder.WithAnnotation(new ResourceCommandAnnotation(name, displayName, updateState ?? (c => ResourceCommandState.Enabled), executeCommand, displayDescription, parameter, confirmationMessage, iconName, iconVariant, isHighlighted)); 4075return targetRunning ? ResourceCommandState.Enabled : ResourceCommandState.Disabled;
Aspire.Hosting.Azure (6)
AzureProvisioningController.cs (5)
925return _state.Status.CurrentIntent is null ? ResourceCommandState.Enabled : ResourceCommandState.Disabled; 950return ResourceCommandState.Enabled; 969return activeOperation!.CancellationRequested ? ResourceCommandState.Disabled : ResourceCommandState.Enabled; 974: ResourceCommandState.Enabled; 981_ => ResourceCommandState.Enabled
AzureResourcePreparer.cs (1)
124commandOptions.UpdateState ?? (_ => ResourceCommandState.Enabled),
Aspire.Hosting.Azure.Kusto (2)
AzureKustoBuilderExtensions.cs (2)
365return context.ResourceSnapshot.State?.Text == KnownResourceStates.Running ? ResourceCommandState.Enabled : ResourceCommandState.Disabled; 376return context.ResourceSnapshot.State?.Text == KnownResourceStates.Running ? ResourceCommandState.Enabled : ResourceCommandState.Disabled;
Aspire.Hosting.Azure.Tests (20)
AzureEnvironmentResourceExtensionsTests.cs (20)
379Assert.All(environmentEvent.Snapshot.Commands, command => Assert.Equal(ResourceCommandState.Enabled, command.State)); 707AssertCommandState(keyVaultEvent.Snapshot, AzureProvisioningController.GetAzureResourceCommandName, ResourceCommandState.Enabled); 709AssertCommandState(keyVaultEvent.Snapshot, AzureProvisioningController.DeleteAzureResourceCommandName, ResourceCommandState.Enabled); 710AssertCommandState(keyVaultEvent.Snapshot, AzureProvisioningController.ForgetStateCommandName, ResourceCommandState.Enabled); 711AssertCommandState(keyVaultEvent.Snapshot, AzureProvisioningController.ReprovisionResourceCommandName, ResourceCommandState.Enabled); 741AssertCommandState(postgresEvent.Snapshot, AzureProvisioningController.ChangeResourceLocationCommandName, ResourceCommandState.Enabled); 1420AssertCommandState(storageEvent.Snapshot, AzureProvisioningController.GetAzureResourceCommandName, ResourceCommandState.Enabled); 1421AssertCommandState(storageEvent.Snapshot, AzureProvisioningController.CancelCommandName, ResourceCommandState.Enabled); 1496AssertCommandState(storageEvent.Snapshot, AzureProvisioningController.CancelCommandName, ResourceCommandState.Enabled); 2258Assert.All(environmentEvent.Snapshot.Commands, command => Assert.Equal(ResourceCommandState.Enabled, command.State)); 2316Assert.All(environmentEvent.Snapshot.Commands, command => Assert.Equal(ResourceCommandState.Enabled, command.State)); 2340Assert.Equal(ResourceCommandState.Enabled, controller.GetEnvironmentCommandState()); 2458AssertCommandState(storageEvent.Snapshot, AzureProvisioningController.CancelCommandName, ResourceCommandState.Enabled); 5044AssertCommandState(snapshot, AzureProvisioningController.GetAzureResourceCommandName, ResourceCommandState.Enabled); 5045AssertCommandState(snapshot, AzureProvisioningController.CancelCommandName, ResourceCommandState.Enabled); 5053AssertCommandState(snapshot, AzureProvisioningController.ChangeResourceLocationCommandName, ResourceCommandState.Enabled); 5054AssertCommandState(snapshot, AzureProvisioningController.GetAzureResourceCommandName, ResourceCommandState.Enabled); 5056AssertCommandState(snapshot, AzureProvisioningController.DeleteAzureResourceCommandName, ResourceCommandState.Enabled); 5057AssertCommandState(snapshot, AzureProvisioningController.ForgetStateCommandName, ResourceCommandState.Enabled); 5058AssertCommandState(snapshot, AzureProvisioningController.ReprovisionResourceCommandName, ResourceCommandState.Enabled);
Aspire.Hosting.Blazor (2)
BrowserDebuggerHelper.cs (2)
222? ResourceCommandState.Enabled 274return ResourceCommandState.Enabled;
Aspire.Hosting.Blazor.Tests (3)
BlazorHostedExtensionsTests.cs (1)
249Assert.Equal(ResourceCommandState.Enabled, debugCommand.UpdateState(CreateRunningCommandStateContext()));
WithBlazorAppTests.cs (2)
236[InlineData("Running", ResourceCommandState.Enabled)] 269[InlineData(true, true, ResourceCommandState.Enabled)]
Aspire.Hosting.Browsers (3)
BrowserLogsBuilderExtensions.cs (3)
191return ResourceCommandState.Enabled; 228? ResourceCommandState.Enabled 280? ResourceCommandState.Enabled
Aspire.Hosting.Browsers.Tests (5)
BrowserLogsBuilderExtensionsTests.cs (2)
1364command.State == ResourceCommandState.Enabled)).DefaultTimeout(); 1366Assert.Equal(ResourceCommandState.Enabled, enabledEvent.Snapshot.Commands.Single(command => command.Name == BrowserLogsBuilderExtensions.OpenTrackedBrowserCommandName).State);
src\Aspire.Hosting.Browsers\BrowserLogsBuilderExtensions.cs (3)
191return ResourceCommandState.Enabled; 228? ResourceCommandState.Enabled 280? ResourceCommandState.Enabled
Aspire.Hosting.DevTunnels (1)
DevTunnelResourceBuilderExtensions.cs (1)
652? ResourceCommandState.Enabled
Aspire.Hosting.DevTunnels.Tests (1)
DevTunnelResourceBuilderExtensionsTests.cs (1)
585Assert.Equal(ResourceCommandState.Enabled, enabledState);
Aspire.Hosting.EntityFrameworkCore (1)
EFResourceBuilderExtensions.cs (1)
882return ResourceCommandState.Enabled;
Aspire.Hosting.EntityFrameworkCore.Tests (4)
EFCoreOperationExecutorTests.cs (1)
218_ => ResourceCommandState.Enabled,
EFMigrationCommandsTests.cs (2)
212Assert.Equal(ResourceCommandState.Enabled, state); 293Assert.Equal(ResourceCommandState.Enabled, state);
TestServices\TestEfTool.cs (1)
25_ => ResourceCommandState.Enabled,
Aspire.Hosting.Maui (1)
Lifecycle\MauiBuildQueueEventSubscriber.cs (1)
530return ResourceCommandState.Enabled;
Aspire.Hosting.Maui.Tests (3)
MauiBuildQueueTests.cs (3)
571Assert.Equal(ResourceCommandState.Enabled, stopCommand.UpdateState(CreateUpdateStateContext(env, "Building"))); 604Assert.Equal(ResourceCommandState.Enabled, stopCommand.UpdateState(CreateUpdateStateContext(env, KnownResourceStates.Running))); 1124updateState: _ => ResourceCommandState.Enabled,
Aspire.Hosting.MongoDB (1)
src\Shared\ContainerReplCommand.cs (1)
62? ResourceCommandState.Enabled
Aspire.Hosting.MongoDB.Tests (1)
tests\Shared\ContainerReplCommandTestBase.cs (1)
40[InlineData(nameof(KnownResourceStates.Running), "container-id", ResourceCommandState.Enabled)]
Aspire.Hosting.MySql (1)
src\Shared\ContainerReplCommand.cs (1)
62? ResourceCommandState.Enabled
Aspire.Hosting.MySql.Tests (1)
tests\Shared\ContainerReplCommandTestBase.cs (1)
40[InlineData(nameof(KnownResourceStates.Running), "container-id", ResourceCommandState.Enabled)]
Aspire.Hosting.PostgreSQL (1)
src\Shared\ContainerReplCommand.cs (1)
62? ResourceCommandState.Enabled
Aspire.Hosting.PostgreSQL.Tests (1)
tests\Shared\ContainerReplCommandTestBase.cs (1)
40[InlineData(nameof(KnownResourceStates.Running), "container-id", ResourceCommandState.Enabled)]
Aspire.Hosting.Redis (1)
src\Shared\ContainerReplCommand.cs (1)
62? ResourceCommandState.Enabled
Aspire.Hosting.Redis.Tests (1)
tests\Shared\ContainerReplCommandTestBase.cs (1)
40[InlineData(nameof(KnownResourceStates.Running), "container-id", ResourceCommandState.Enabled)]
Aspire.Hosting.SqlServer (1)
src\Shared\ContainerReplCommand.cs (1)
62? ResourceCommandState.Enabled
Aspire.Hosting.SqlServer.Tests (1)
tests\Shared\ContainerReplCommandTestBase.cs (1)
40[InlineData(nameof(KnownResourceStates.Running), "container-id", ResourceCommandState.Enabled)]
Aspire.Hosting.Tests (22)
Backchannel\AuxiliaryBackchannelRpcTargetTests.cs (1)
208new ResourceCommandSnapshot("start", ResourceCommandState.Enabled, "Start", "Start the resource", null, null, null, null, false)
Dashboard\DashboardServiceTests.cs (2)
170UpdateState = c => Hosting.ApplicationModel.ResourceCommandState.Enabled, 197UpdateState = c => Hosting.ApplicationModel.ResourceCommandState.Enabled,
ResourceCommandAnnotationTests.cs (12)
22[InlineData("start", "Exited", ResourceCommandState.Enabled)] 23[InlineData("start", "Finished", ResourceCommandState.Enabled)] 24[InlineData("start", "FailedToStart", ResourceCommandState.Enabled)] 25[InlineData("start", "Unknown", ResourceCommandState.Enabled)] 26[InlineData("start", "Waiting", ResourceCommandState.Enabled)] 33[InlineData("stop", "Running", ResourceCommandState.Enabled)] 45[InlineData("restart", "Running", ResourceCommandState.Enabled)] 128[InlineData("rebuild", "Running", ResourceCommandState.Enabled)] 129[InlineData("rebuild", "Exited", ResourceCommandState.Enabled)] 130[InlineData("rebuild", "Finished", ResourceCommandState.Enabled)] 131[InlineData("rebuild", "FailedToStart", ResourceCommandState.Enabled)] 133[InlineData("rebuild", "Waiting", ResourceCommandState.Enabled)]
ResourceNotificationTests.cs (1)
2128return new("command", ResourceCommandState.Enabled, "Command", DisplayDescription: null, Parameter: null, ConfirmationMessage: null, IconName: null, IconVariant: null, IsHighlighted: false)
WithHttpCommandTests.cs (6)
971e.Snapshot.Commands.First(c => c.Name == "mycommand").State == ResourceCommandState.Enabled).DefaultTimeout(); 973Assert.Equal(ResourceCommandState.Enabled, runningEvent.Snapshot.Commands.First(c => c.Name == "mycommand").State); 997return enableCommand ? ResourceCommandState.Enabled : ResourceCommandState.Hidden; 1028e => e.Snapshot.Commands.First(c => c.Name == "mycommand").State == ResourceCommandState.Enabled).DefaultTimeout(); 1031Assert.Equal(ResourceCommandState.Enabled, enabledEvent.Snapshot.Commands.First(c => c.Name == "mycommand").State); 1070e.Snapshot.Commands.FirstOrDefault(c => c.Name == commandName)?.State == ResourceCommandState.Enabled).DefaultTimeout();
Aspire.Hosting.Valkey (1)
src\Shared\ContainerReplCommand.cs (1)
62? ResourceCommandState.Enabled
Aspire.Hosting.Valkey.Tests (1)
tests\Shared\ContainerReplCommandTestBase.cs (1)
40[InlineData(nameof(KnownResourceStates.Running), "container-id", ResourceCommandState.Enabled)]