20 references to Enabled
Aspire.Hosting (7)
ApplicationModel\CommandsConfigurationExtensions.cs (3)
38
return ResourceCommandState.
Enabled
;
71
return ResourceCommandState.
Enabled
;
105
return ResourceCommandState.
Enabled
;
Dashboard\proto\Partials.cs (1)
144
Hosting.ApplicationModel.ResourceCommandState.
Enabled
=> ResourceCommandState.Enabled,
ResourceBuilderExtensions.cs (3)
1685
return builder.WithAnnotation(new ResourceCommandAnnotation(name, displayName, commandOptions.UpdateState ?? (c => ResourceCommandState.
Enabled
), executeCommand, commandOptions.Description, commandOptions.Parameter, commandOptions.ConfirmationMessage, commandOptions.IconName, commandOptions.IconVariant, commandOptions.IsHighlighted));
1750
return builder.WithAnnotation(new ResourceCommandAnnotation(name, displayName, updateState ?? (c => ResourceCommandState.
Enabled
), executeCommand, displayDescription, parameter, confirmationMessage, iconName, iconVariant, isHighlighted));
1945
commandOptions.UpdateState = context => targetRunning ? ResourceCommandState.
Enabled
: ResourceCommandState.Disabled;
Aspire.Hosting.Tests (13)
Dashboard\DashboardServiceTests.cs (1)
158
UpdateState = c => ApplicationModel.ResourceCommandState.
Enabled
,
ResourceCommandAnnotationTests.cs (7)
14
[InlineData("resource-start", "Exited", ResourceCommandState.
Enabled
)]
15
[InlineData("resource-start", "Finished", ResourceCommandState.
Enabled
)]
16
[InlineData("resource-start", "FailedToStart", ResourceCommandState.
Enabled
)]
17
[InlineData("resource-start", "Unknown", ResourceCommandState.
Enabled
)]
18
[InlineData("resource-start", "Waiting", ResourceCommandState.
Enabled
)]
24
[InlineData("resource-stop", "Running", ResourceCommandState.
Enabled
)]
35
[InlineData("resource-restart", "Running", ResourceCommandState.
Enabled
)]
WithHttpCommandTests.cs (5)
388
if (commandState == ResourceCommandState.
Enabled
)
417
Assert.Equal(ResourceCommandState.
Enabled
, commandState);
444
return enableCommand ? ResourceCommandState.
Enabled
: ResourceCommandState.Hidden;
458
if (commandState == ResourceCommandState.
Enabled
)
488
Assert.Equal(ResourceCommandState.
Enabled
, commandState);