26 references to Enabled
Aspire.Hosting (9)
ApplicationModel\CommandsConfigurationExtensions.cs (3)
38
return ResourceCommandState.
Enabled
;
71
return ResourceCommandState.
Enabled
;
111
return ResourceCommandState.
Enabled
;
Dashboard\proto\Partials.cs (1)
149
Hosting.ApplicationModel.ResourceCommandState.
Enabled
=> ResourceCommandState.Enabled,
Orchestrator\ParameterProcessor.cs (2)
205
updateState: _ => ResourceCommandState.
Enabled
,
221
updateState: _ => HasParameterValue(parameterResource) ? ResourceCommandState.
Enabled
: ResourceCommandState.Hidden,
ResourceBuilderExtensions.cs (3)
2011
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));
2076
return builder.WithAnnotation(new ResourceCommandAnnotation(name, displayName, updateState ?? (c => ResourceCommandState.
Enabled
), executeCommand, displayDescription, parameter, confirmationMessage, iconName, iconVariant, isHighlighted));
2257
return targetRunning ? ResourceCommandState.
Enabled
: ResourceCommandState.Disabled;
Aspire.Hosting.Azure.Kusto (2)
AzureKustoBuilderExtensions.cs (2)
344
return context.ResourceSnapshot.State?.Text == KnownResourceStates.Running ? ResourceCommandState.
Enabled
: ResourceCommandState.Disabled;
355
return context.ResourceSnapshot.State?.Text == KnownResourceStates.Running ? ResourceCommandState.
Enabled
: ResourceCommandState.Disabled;
Aspire.Hosting.Tests (15)
Backchannel\AuxiliaryBackchannelRpcTargetTests.cs (1)
119
new ResourceCommandSnapshot("resource-start", ResourceCommandState.
Enabled
, "Start", "Start the resource", null, null, null, null, false),
Dashboard\DashboardServiceTests.cs (1)
159
UpdateState = c => Aspire.Hosting.ApplicationModel.ResourceCommandState.
Enabled
,
ResourceCommandAnnotationTests.cs (7)
15
[InlineData("resource-start", "Exited", ResourceCommandState.
Enabled
)]
16
[InlineData("resource-start", "Finished", ResourceCommandState.
Enabled
)]
17
[InlineData("resource-start", "FailedToStart", ResourceCommandState.
Enabled
)]
18
[InlineData("resource-start", "Unknown", ResourceCommandState.
Enabled
)]
19
[InlineData("resource-start", "Waiting", ResourceCommandState.
Enabled
)]
25
[InlineData("resource-stop", "Running", ResourceCommandState.
Enabled
)]
36
[InlineData("resource-restart", "Running", ResourceCommandState.
Enabled
)]
WithHttpCommandTests.cs (6)
441
e.Snapshot.Commands.First(c => c.Name == "mycommand").State == ResourceCommandState.
Enabled
).DefaultTimeout();
443
Assert.Equal(ResourceCommandState.
Enabled
, runningEvent.Snapshot.Commands.First(c => c.Name == "mycommand").State);
467
return enableCommand ? ResourceCommandState.
Enabled
: ResourceCommandState.Hidden;
498
e => e.Snapshot.Commands.First(c => c.Name == "mycommand").State == ResourceCommandState.
Enabled
).DefaultTimeout();
501
Assert.Equal(ResourceCommandState.
Enabled
, enabledEvent.Snapshot.Commands.First(c => c.Name == "mycommand").State);
540
e.Snapshot.Commands.FirstOrDefault(c => c.Name == commandName)?.State == ResourceCommandState.
Enabled
).DefaultTimeout();