1 instantiation of ResourceCommandAnnotation
Aspire.Hosting (1)
ResourceBuilderExtensions.cs (1)
900
return builder.WithAnnotation(new
ResourceCommandAnnotation
(type, displayName, updateState ?? (c => ResourceCommandState.Enabled), executeCommand, displayDescription, parameter, confirmationMessage, iconName, iconVariant, isHighlighted));
15 references to ResourceCommandAnnotation
Aspire.Hosting (11)
ApplicationModel\ResourceCommandAnnotation.cs (3)
15
/// Initializes a new instance of the <see cref="
ResourceCommandAnnotation
"/> class.
129
/// The result of executing a command. Returned from <see cref="
ResourceCommandAnnotation
.ExecuteCommand"/>.
145
/// Context for <see cref="
ResourceCommandAnnotation
.UpdateState"/>.
ApplicationModel\ResourceNotificationService.cs (3)
399
foreach (
var
annotation in resource.Annotations.OfType<
ResourceCommandAnnotation
>())
458
static ResourceCommandSnapshot CreateCommandFromAnnotation(
ResourceCommandAnnotation
annotation, CustomResourceSnapshot previousState, IServiceProvider serviceProvider)
Dashboard\DashboardCommandExecutor.cs (1)
22
public async Task<ExecuteCommandResult> ExecuteCommandAsync(string resourceId,
ResourceCommandAnnotation
annotation, CancellationToken cancellationToken)
Dashboard\DashboardServiceData.cs (1)
103
var annotation = resource.Annotations.OfType<
ResourceCommandAnnotation
>().SingleOrDefault(a => a.Type == type);
ResourceBuilderExtensions.cs (3)
845
/// Adds a <see cref="
ResourceCommandAnnotation
"/> to the resource annotations to add a resource command.
894
var
existingAnnotation = builder.Resource.Annotations.OfType<
ResourceCommandAnnotation
>().SingleOrDefault(a => a.Type == type);
Aspire.Hosting.Tests (4)
Dashboard\DashboardLifecycleHookTests.cs (1)
86
Assert.Empty(dashboardResource.Annotations.OfType<
ResourceCommandAnnotation
>());
Dcp\ApplicationExecutorTests.cs (1)
993
var commandAnnotations = resource.Annotations.OfType<
ResourceCommandAnnotation
>().ToList();
ResourceCommandAnnotationTests.cs (2)
40
var
startCommand = resourceBuilder.Resource.Annotations.OfType<
ResourceCommandAnnotation
>().Single(a => a.Type == commandType);