1 instantiation of ResourceCommandAnnotation
Aspire.Hosting (1)
ResourceBuilderExtensions.cs (1)
1008return builder.WithAnnotation(new ResourceCommandAnnotation(name, 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)
398foreach (var annotation in resource.Annotations.OfType<ResourceCommandAnnotation>()) 457static ResourceCommandSnapshot CreateCommandFromAnnotation(ResourceCommandAnnotation annotation, CustomResourceSnapshot previousState, IServiceProvider serviceProvider)
Dashboard\DashboardCommandExecutor.cs (1)
22public async Task<ExecuteCommandResult> ExecuteCommandAsync(string resourceId, ResourceCommandAnnotation annotation, CancellationToken cancellationToken)
Dashboard\DashboardServiceData.cs (1)
95var annotation = resource.Annotations.OfType<ResourceCommandAnnotation>().SingleOrDefault(a => a.Name == type);
ResourceBuilderExtensions.cs (3)
948/// Adds a <see cref="ResourceCommandAnnotation"/> to the resource annotations to add a resource command. 1002var existingAnnotation = builder.Resource.Annotations.OfType<ResourceCommandAnnotation>().SingleOrDefault(a => a.Name == name);
Aspire.Hosting.Tests (4)
Dashboard\DashboardLifecycleHookTests.cs (1)
97Assert.Empty(dashboardResource.Annotations.OfType<ResourceCommandAnnotation>());
Dcp\ApplicationExecutorTests.cs (1)
1037var commandAnnotations = resource.Annotations.OfType<ResourceCommandAnnotation>().ToList();
ResourceCommandAnnotationTests.cs (2)
43var startCommand = resourceBuilder.Resource.Annotations.OfType<ResourceCommandAnnotation>().Single(a => a.Name == commandName);