4 instantiations of ResourceCommandSnapshot
Aspire.Hosting (1)
ApplicationModel\ResourceNotificationService.cs (1)
805return 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)
121new ResourceCommandSnapshot("start", ResourceCommandState.Enabled, "Start", "Start the resource", null, null, null, null, false), 122new ResourceCommandSnapshot("stop", ResourceCommandState.Disabled, "Stop", "Stop the resource", null, null, null, null, false), 123new ResourceCommandSnapshot("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)
740ImmutableArray<ResourceCommandSnapshot>.Builder? builder = null; 744var existingCommand = FindByName(previousState.Commands, annotation.Name); 750builder = ImmutableArray.CreateBuilder<ResourceCommandSnapshot>(previousState.Commands.Length); 766builder = ImmutableArray.CreateBuilder<ResourceCommandSnapshot>(previousState.Commands.Length); 770var newCommand = existingCommand with 788static ResourceCommandSnapshot? FindByName(ImmutableArray<ResourceCommandSnapshot> commands, string name) 801static 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; }