97 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)
375updateState: _ => ResourceCommandState.Enabled, 411updateState: _ => 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)
957return _state.Status.CurrentIntent is null ? ResourceCommandState.Enabled : ResourceCommandState.Disabled; 998return ResourceCommandState.Enabled; 1017return activeOperation!.CancellationRequested ? ResourceCommandState.Disabled : ResourceCommandState.Enabled; 1022: ResourceCommandState.Enabled; 1029_ => ResourceCommandState.Enabled
AzureResourcePreparer.cs (1)
169commandOptions.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 (21)
AzureEnvironmentResourceExtensionsTests.cs (21)
170Assert.Equal(ResourceCommandState.Enabled, delete.UpdateState(new UpdateCommandStateContext 678Assert.All(environmentEvent.Snapshot.Commands, command => Assert.Equal(ResourceCommandState.Enabled, command.State)); 1028AssertCommandState(keyVaultEvent.Snapshot, AzureProvisioningController.GetAzureResourceCommandName, ResourceCommandState.Enabled); 1030AssertCommandState(keyVaultEvent.Snapshot, AzureProvisioningController.DeleteAzureResourceCommandName, ResourceCommandState.Enabled); 1031AssertCommandState(keyVaultEvent.Snapshot, AzureProvisioningController.ForgetStateCommandName, ResourceCommandState.Enabled); 1032AssertCommandState(keyVaultEvent.Snapshot, AzureProvisioningController.ReprovisionResourceCommandName, ResourceCommandState.Enabled); 1062AssertCommandState(postgresEvent.Snapshot, AzureProvisioningController.ChangeResourceLocationCommandName, ResourceCommandState.Enabled); 1741AssertCommandState(storageEvent.Snapshot, AzureProvisioningController.GetAzureResourceCommandName, ResourceCommandState.Enabled); 1742AssertCommandState(storageEvent.Snapshot, AzureProvisioningController.CancelCommandName, ResourceCommandState.Enabled); 1817AssertCommandState(storageEvent.Snapshot, AzureProvisioningController.CancelCommandName, ResourceCommandState.Enabled); 2579Assert.All(environmentEvent.Snapshot.Commands, command => Assert.Equal(ResourceCommandState.Enabled, command.State)); 2637Assert.All(environmentEvent.Snapshot.Commands, command => Assert.Equal(ResourceCommandState.Enabled, command.State)); 2661Assert.Equal(ResourceCommandState.Enabled, controller.GetEnvironmentCommandState()); 2779AssertCommandState(storageEvent.Snapshot, AzureProvisioningController.CancelCommandName, ResourceCommandState.Enabled); 5365AssertCommandState(snapshot, AzureProvisioningController.GetAzureResourceCommandName, ResourceCommandState.Enabled); 5366AssertCommandState(snapshot, AzureProvisioningController.CancelCommandName, ResourceCommandState.Enabled); 5374AssertCommandState(snapshot, AzureProvisioningController.ChangeResourceLocationCommandName, ResourceCommandState.Enabled); 5375AssertCommandState(snapshot, AzureProvisioningController.GetAzureResourceCommandName, ResourceCommandState.Enabled); 5377AssertCommandState(snapshot, AzureProvisioningController.DeleteAzureResourceCommandName, ResourceCommandState.Enabled); 5378AssertCommandState(snapshot, AzureProvisioningController.ForgetStateCommandName, ResourceCommandState.Enabled); 5379AssertCommandState(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)
230Assert.Equal(ResourceCommandState.Enabled, debugCommand.UpdateState(CreateRunningCommandStateContext()));
WithBlazorAppTests.cs (2)
237[InlineData("Running", ResourceCommandState.Enabled)] 270[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)
622Assert.Equal(ResourceCommandState.Enabled, enabledState);
Aspire.Hosting.EntityFrameworkCore (1)
EFResourceBuilderExtensions.cs (1)
877return ResourceCommandState.Enabled;
Aspire.Hosting.EntityFrameworkCore.Tests (4)
EFCoreOperationExecutorTests.cs (1)
220_ => ResourceCommandState.Enabled,
EFMigrationCommandsTests.cs (2)
214Assert.Equal(ResourceCommandState.Enabled, state); 295Assert.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)]