83 references to Enabled
Aspire.Hosting (10)
ApplicationModel\CommandsConfigurationExtensions.cs (4)
44return ResourceCommandState.Enabled; 77return ResourceCommandState.Enabled; 117return ResourceCommandState.Enabled; 166? ResourceCommandState.Enabled
Dashboard\proto\Partials.cs (1)
174Hosting.ApplicationModel.ResourceCommandState.Enabled => ResourceCommandState.Enabled,
Orchestrator\ParameterProcessor.cs (2)
268updateState: _ => ResourceCommandState.Enabled, 304updateState: _ => HasParameterValue(parameterResource) ? ResourceCommandState.Enabled : ResourceCommandState.Hidden,
ResourceBuilderExtensions.cs (3)
2935return 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)); 3001return builder.WithAnnotation(new ResourceCommandAnnotation(name, displayName, updateState ?? (c => ResourceCommandState.Enabled), executeCommand, displayDescription, parameter, confirmationMessage, iconName, iconVariant, isHighlighted)); 3704return targetRunning ? ResourceCommandState.Enabled : ResourceCommandState.Disabled;
Aspire.Hosting.Azure (6)
AzureProvisioningController.cs (5)
928return _state.Status.CurrentIntent is null ? ResourceCommandState.Enabled : ResourceCommandState.Disabled; 953return ResourceCommandState.Enabled; 972return activeOperation!.CancellationRequested ? ResourceCommandState.Disabled : ResourceCommandState.Enabled; 977: ResourceCommandState.Enabled; 984_ => ResourceCommandState.Enabled
AzureResourcePreparer.cs (1)
126commandOptions.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)
382Assert.All(environmentEvent.Snapshot.Commands, command => Assert.Equal(ResourceCommandState.Enabled, command.State)); 710AssertCommandState(keyVaultEvent.Snapshot, AzureProvisioningController.GetAzureResourceCommandName, ResourceCommandState.Enabled); 712AssertCommandState(keyVaultEvent.Snapshot, AzureProvisioningController.DeleteAzureResourceCommandName, ResourceCommandState.Enabled); 713AssertCommandState(keyVaultEvent.Snapshot, AzureProvisioningController.ForgetStateCommandName, ResourceCommandState.Enabled); 714AssertCommandState(keyVaultEvent.Snapshot, AzureProvisioningController.ReprovisionResourceCommandName, ResourceCommandState.Enabled); 744AssertCommandState(postgresEvent.Snapshot, AzureProvisioningController.ChangeResourceLocationCommandName, ResourceCommandState.Enabled); 1423AssertCommandState(storageEvent.Snapshot, AzureProvisioningController.GetAzureResourceCommandName, ResourceCommandState.Enabled); 1424AssertCommandState(storageEvent.Snapshot, AzureProvisioningController.CancelCommandName, ResourceCommandState.Enabled); 1499AssertCommandState(storageEvent.Snapshot, AzureProvisioningController.CancelCommandName, ResourceCommandState.Enabled); 2261Assert.All(environmentEvent.Snapshot.Commands, command => Assert.Equal(ResourceCommandState.Enabled, command.State)); 2319Assert.All(environmentEvent.Snapshot.Commands, command => Assert.Equal(ResourceCommandState.Enabled, command.State)); 2343Assert.Equal(ResourceCommandState.Enabled, controller.GetEnvironmentCommandState()); 2461AssertCommandState(storageEvent.Snapshot, AzureProvisioningController.CancelCommandName, ResourceCommandState.Enabled); 5035AssertCommandState(snapshot, AzureProvisioningController.GetAzureResourceCommandName, ResourceCommandState.Enabled); 5036AssertCommandState(snapshot, AzureProvisioningController.CancelCommandName, ResourceCommandState.Enabled); 5044AssertCommandState(snapshot, AzureProvisioningController.ChangeResourceLocationCommandName, ResourceCommandState.Enabled); 5045AssertCommandState(snapshot, AzureProvisioningController.GetAzureResourceCommandName, ResourceCommandState.Enabled); 5047AssertCommandState(snapshot, AzureProvisioningController.DeleteAzureResourceCommandName, ResourceCommandState.Enabled); 5048AssertCommandState(snapshot, AzureProvisioningController.ForgetStateCommandName, ResourceCommandState.Enabled); 5049AssertCommandState(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)
219Assert.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)
1365command.State == ResourceCommandState.Enabled)).DefaultTimeout(); 1367Assert.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)
658? ResourceCommandState.Enabled
Aspire.Hosting.DevTunnels.Tests (1)
DevTunnelResourceBuilderExtensionsTests.cs (1)
578Assert.Equal(ResourceCommandState.Enabled, enabledState);
Aspire.Hosting.EntityFrameworkCore (1)
EFResourceBuilderExtensions.cs (1)
796return ResourceCommandState.Enabled;
Aspire.Hosting.EntityFrameworkCore.Tests (3)
EFCoreOperationExecutorTests.cs (1)
222_ => ResourceCommandState.Enabled,
EFMigrationCommandsTests.cs (2)
212Assert.Equal(ResourceCommandState.Enabled, state); 293Assert.Equal(ResourceCommandState.Enabled, state);
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.Tests (22)
Backchannel\AuxiliaryBackchannelRpcTargetTests.cs (1)
208new ResourceCommandSnapshot("start", ResourceCommandState.Enabled, "Start", "Start the resource", null, null, null, null, false)
Dashboard\DashboardServiceTests.cs (2)
165UpdateState = c => Hosting.ApplicationModel.ResourceCommandState.Enabled, 192UpdateState = c => Hosting.ApplicationModel.ResourceCommandState.Enabled,
ResourceCommandAnnotationTests.cs (12)
16[InlineData("start", "Exited", ResourceCommandState.Enabled)] 17[InlineData("start", "Finished", ResourceCommandState.Enabled)] 18[InlineData("start", "FailedToStart", ResourceCommandState.Enabled)] 19[InlineData("start", "Unknown", ResourceCommandState.Enabled)] 20[InlineData("start", "Waiting", ResourceCommandState.Enabled)] 27[InlineData("stop", "Running", ResourceCommandState.Enabled)] 39[InlineData("restart", "Running", ResourceCommandState.Enabled)] 122[InlineData("rebuild", "Running", ResourceCommandState.Enabled)] 123[InlineData("rebuild", "Exited", ResourceCommandState.Enabled)] 124[InlineData("rebuild", "Finished", ResourceCommandState.Enabled)] 125[InlineData("rebuild", "FailedToStart", ResourceCommandState.Enabled)] 127[InlineData("rebuild", "Waiting", ResourceCommandState.Enabled)]
ResourceNotificationTests.cs (1)
1837return 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();