32 references to Enabled
Aspire.Hosting (10)
ApplicationModel\CommandsConfigurationExtensions.cs (4)
41
return ResourceCommandState.
Enabled
;
74
return ResourceCommandState.
Enabled
;
114
return ResourceCommandState.
Enabled
;
171
? 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)
2206
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));
2271
return builder.WithAnnotation(new ResourceCommandAnnotation(name, displayName, updateState ?? (c => ResourceCommandState.
Enabled
), executeCommand, displayDescription, parameter, confirmationMessage, iconName, iconVariant, isHighlighted));
2456
return targetRunning ? ResourceCommandState.
Enabled
: ResourceCommandState.Disabled;
Aspire.Hosting.Azure.Kusto (2)
AzureKustoBuilderExtensions.cs (2)
348
return context.ResourceSnapshot.State?.Text == KnownResourceStates.Running ? ResourceCommandState.
Enabled
: ResourceCommandState.Disabled;
359
return context.ResourceSnapshot.State?.Text == KnownResourceStates.Running ? ResourceCommandState.
Enabled
: ResourceCommandState.Disabled;
Aspire.Hosting.Tests (20)
Backchannel\AuxiliaryBackchannelRpcTargetTests.cs (1)
121
new ResourceCommandSnapshot("start", ResourceCommandState.
Enabled
, "Start", "Start the resource", null, null, null, null, false),
Dashboard\DashboardServiceTests.cs (1)
160
UpdateState = c => Aspire.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
)]
WithHttpCommandTests.cs (6)
440
e.Snapshot.Commands.First(c => c.Name == "mycommand").State == ResourceCommandState.
Enabled
).DefaultTimeout();
442
Assert.Equal(ResourceCommandState.
Enabled
, runningEvent.Snapshot.Commands.First(c => c.Name == "mycommand").State);
466
return enableCommand ? ResourceCommandState.
Enabled
: ResourceCommandState.Hidden;
497
e => e.Snapshot.Commands.First(c => c.Name == "mycommand").State == ResourceCommandState.
Enabled
).DefaultTimeout();
500
Assert.Equal(ResourceCommandState.
Enabled
, enabledEvent.Snapshot.Commands.First(c => c.Name == "mycommand").State);
539
e.Snapshot.Commands.FirstOrDefault(c => c.Name == commandName)?.State == ResourceCommandState.
Enabled
).DefaultTimeout();