4 instantiations of ResourceCommandSnapshot
Aspire.Hosting (1)
ApplicationModel\ResourceNotificationService.cs (1)
786return new ResourceCommandSnapshot(annotation.Name, state, annotation.DisplayName, annotation.DisplayDescription, annotation.Parameter, annotation.ConfirmationMessage, annotation.IconName, annotation.IconVariant, annotation.IsHighlighted);
Aspire.Hosting.Tests (3)
Backchannel\AuxiliaryBackchannelRpcTargetTests.cs (3)
119new ResourceCommandSnapshot("resource-start", ResourceCommandState.Enabled, "Start", "Start the resource", null, null, null, null, false), 120new ResourceCommandSnapshot("resource-stop", ResourceCommandState.Disabled, "Stop", "Stop the resource", null, null, null, null, false), 121new ResourceCommandSnapshot("resource-restart", ResourceCommandState.Hidden, "Restart", null, null, null, null, null, true)
11 references to ResourceCommandSnapshot
Aspire.Hosting (11)
ApplicationModel\CustomResourceSnapshot.cs (1)
119public ImmutableArray<ResourceCommandSnapshot> Commands { get; init; } = [];
ApplicationModel\ResourceNotificationService.cs (8)
721ImmutableArray<ResourceCommandSnapshot>.Builder? builder = null; 725var existingCommand = FindByName(previousState.Commands, annotation.Name); 731builder = ImmutableArray.CreateBuilder<ResourceCommandSnapshot>(previousState.Commands.Length); 747builder = ImmutableArray.CreateBuilder<ResourceCommandSnapshot>(previousState.Commands.Length); 751var newCommand = existingCommand with 769static ResourceCommandSnapshot? FindByName(ImmutableArray<ResourceCommandSnapshot> commands, string name) 782static ResourceCommandSnapshot CreateCommandFromAnnotation(ResourceCommandAnnotation annotation, CustomResourceSnapshot previousState, IServiceProvider serviceProvider)
Dashboard\proto\Partials.cs (1)
98foreach (var command in snapshot.Commands)
Dashboard\ResourceSnapshot.cs (1)
30public required ImmutableArray<ResourceCommandSnapshot> Commands { get; init; }