96 references to Enabled
Aspire.Hosting (10)
ApplicationModel\CommandsConfigurationExtensions.cs (4)
45
return ResourceCommandState.
Enabled
;
78
return ResourceCommandState.
Enabled
;
119
return ResourceCommandState.
Enabled
;
168
? ResourceCommandState.
Enabled
Dashboard\proto\Partials.cs (1)
174
Hosting.ApplicationModel.ResourceCommandState.
Enabled
=> ResourceCommandState.Enabled,
Orchestrator\ParameterProcessor.cs (2)
265
updateState: _ => ResourceCommandState.
Enabled
,
301
updateState: _ => HasParameterValue(parameterResource) ? ResourceCommandState.
Enabled
: ResourceCommandState.Hidden,
ResourceBuilderExtensions.cs (3)
3306
return 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));
3372
return builder.WithAnnotation(new ResourceCommandAnnotation(name, displayName, updateState ?? (c => ResourceCommandState.
Enabled
), executeCommand, displayDescription, parameter, confirmationMessage, iconName, iconVariant, isHighlighted));
4075
return targetRunning ? ResourceCommandState.
Enabled
: ResourceCommandState.Disabled;
Aspire.Hosting.Azure (6)
AzureProvisioningController.cs (5)
925
return _state.Status.CurrentIntent is null ? ResourceCommandState.
Enabled
: ResourceCommandState.Disabled;
950
return ResourceCommandState.
Enabled
;
969
return activeOperation!.CancellationRequested ? ResourceCommandState.Disabled : ResourceCommandState.
Enabled
;
974
: ResourceCommandState.
Enabled
;
981
_ => ResourceCommandState.
Enabled
AzureResourcePreparer.cs (1)
124
commandOptions.UpdateState ?? (_ => ResourceCommandState.
Enabled
),
Aspire.Hosting.Azure.Kusto (2)
AzureKustoBuilderExtensions.cs (2)
365
return context.ResourceSnapshot.State?.Text == KnownResourceStates.Running ? ResourceCommandState.
Enabled
: ResourceCommandState.Disabled;
376
return context.ResourceSnapshot.State?.Text == KnownResourceStates.Running ? ResourceCommandState.
Enabled
: ResourceCommandState.Disabled;
Aspire.Hosting.Azure.Tests (20)
AzureEnvironmentResourceExtensionsTests.cs (20)
379
Assert.All(environmentEvent.Snapshot.Commands, command => Assert.Equal(ResourceCommandState.
Enabled
, command.State));
707
AssertCommandState(keyVaultEvent.Snapshot, AzureProvisioningController.GetAzureResourceCommandName, ResourceCommandState.
Enabled
);
709
AssertCommandState(keyVaultEvent.Snapshot, AzureProvisioningController.DeleteAzureResourceCommandName, ResourceCommandState.
Enabled
);
710
AssertCommandState(keyVaultEvent.Snapshot, AzureProvisioningController.ForgetStateCommandName, ResourceCommandState.
Enabled
);
711
AssertCommandState(keyVaultEvent.Snapshot, AzureProvisioningController.ReprovisionResourceCommandName, ResourceCommandState.
Enabled
);
741
AssertCommandState(postgresEvent.Snapshot, AzureProvisioningController.ChangeResourceLocationCommandName, ResourceCommandState.
Enabled
);
1420
AssertCommandState(storageEvent.Snapshot, AzureProvisioningController.GetAzureResourceCommandName, ResourceCommandState.
Enabled
);
1421
AssertCommandState(storageEvent.Snapshot, AzureProvisioningController.CancelCommandName, ResourceCommandState.
Enabled
);
1496
AssertCommandState(storageEvent.Snapshot, AzureProvisioningController.CancelCommandName, ResourceCommandState.
Enabled
);
2258
Assert.All(environmentEvent.Snapshot.Commands, command => Assert.Equal(ResourceCommandState.
Enabled
, command.State));
2316
Assert.All(environmentEvent.Snapshot.Commands, command => Assert.Equal(ResourceCommandState.
Enabled
, command.State));
2340
Assert.Equal(ResourceCommandState.
Enabled
, controller.GetEnvironmentCommandState());
2458
AssertCommandState(storageEvent.Snapshot, AzureProvisioningController.CancelCommandName, ResourceCommandState.
Enabled
);
5044
AssertCommandState(snapshot, AzureProvisioningController.GetAzureResourceCommandName, ResourceCommandState.
Enabled
);
5045
AssertCommandState(snapshot, AzureProvisioningController.CancelCommandName, ResourceCommandState.
Enabled
);
5053
AssertCommandState(snapshot, AzureProvisioningController.ChangeResourceLocationCommandName, ResourceCommandState.
Enabled
);
5054
AssertCommandState(snapshot, AzureProvisioningController.GetAzureResourceCommandName, ResourceCommandState.
Enabled
);
5056
AssertCommandState(snapshot, AzureProvisioningController.DeleteAzureResourceCommandName, ResourceCommandState.
Enabled
);
5057
AssertCommandState(snapshot, AzureProvisioningController.ForgetStateCommandName, ResourceCommandState.
Enabled
);
5058
AssertCommandState(snapshot, AzureProvisioningController.ReprovisionResourceCommandName, ResourceCommandState.
Enabled
);
Aspire.Hosting.Blazor (2)
BrowserDebuggerHelper.cs (2)
222
? ResourceCommandState.
Enabled
274
return ResourceCommandState.
Enabled
;
Aspire.Hosting.Blazor.Tests (3)
BlazorHostedExtensionsTests.cs (1)
249
Assert.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)
191
return ResourceCommandState.
Enabled
;
228
? ResourceCommandState.
Enabled
280
? ResourceCommandState.
Enabled
Aspire.Hosting.Browsers.Tests (5)
BrowserLogsBuilderExtensionsTests.cs (2)
1364
command.State == ResourceCommandState.
Enabled
)).DefaultTimeout();
1366
Assert.Equal(ResourceCommandState.
Enabled
, enabledEvent.Snapshot.Commands.Single(command => command.Name == BrowserLogsBuilderExtensions.OpenTrackedBrowserCommandName).State);
src\Aspire.Hosting.Browsers\BrowserLogsBuilderExtensions.cs (3)
191
return 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)
585
Assert.Equal(ResourceCommandState.
Enabled
, enabledState);
Aspire.Hosting.EntityFrameworkCore (1)
EFResourceBuilderExtensions.cs (1)
882
return ResourceCommandState.
Enabled
;
Aspire.Hosting.EntityFrameworkCore.Tests (4)
EFCoreOperationExecutorTests.cs (1)
218
_ => ResourceCommandState.
Enabled
,
EFMigrationCommandsTests.cs (2)
212
Assert.Equal(ResourceCommandState.
Enabled
, state);
293
Assert.Equal(ResourceCommandState.
Enabled
, state);
TestServices\TestEfTool.cs (1)
25
_ => ResourceCommandState.
Enabled
,
Aspire.Hosting.Maui (1)
Lifecycle\MauiBuildQueueEventSubscriber.cs (1)
530
return ResourceCommandState.
Enabled
;
Aspire.Hosting.Maui.Tests (3)
MauiBuildQueueTests.cs (3)
571
Assert.Equal(ResourceCommandState.
Enabled
, stopCommand.UpdateState(CreateUpdateStateContext(env, "Building")));
604
Assert.Equal(ResourceCommandState.
Enabled
, stopCommand.UpdateState(CreateUpdateStateContext(env, KnownResourceStates.Running)));
1124
updateState: _ => 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)
208
new ResourceCommandSnapshot("start", ResourceCommandState.
Enabled
, "Start", "Start the resource", null, null, null, null, false)
Dashboard\DashboardServiceTests.cs (2)
170
UpdateState = c => Hosting.ApplicationModel.ResourceCommandState.
Enabled
,
197
UpdateState = 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)
2128
return new("command", ResourceCommandState.
Enabled
, "Command", DisplayDescription: null, Parameter: null, ConfirmationMessage: null, IconName: null, IconVariant: null, IsHighlighted: false)
WithHttpCommandTests.cs (6)
971
e.Snapshot.Commands.First(c => c.Name == "mycommand").State == ResourceCommandState.
Enabled
).DefaultTimeout();
973
Assert.Equal(ResourceCommandState.
Enabled
, runningEvent.Snapshot.Commands.First(c => c.Name == "mycommand").State);
997
return enableCommand ? ResourceCommandState.
Enabled
: ResourceCommandState.Hidden;
1028
e => e.Snapshot.Commands.First(c => c.Name == "mycommand").State == ResourceCommandState.
Enabled
).DefaultTimeout();
1031
Assert.Equal(ResourceCommandState.
Enabled
, enabledEvent.Snapshot.Commands.First(c => c.Name == "mycommand").State);
1070
e.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
)]