1 instantiation of ResourceCommandSnapshot
Aspire.Hosting (1)
ApplicationModel\ResourceNotificationService.cs (1)
678
return new
ResourceCommandSnapshot
(annotation.Name, state, annotation.DisplayName, annotation.DisplayDescription, annotation.Parameter, annotation.ConfirmationMessage, annotation.IconName, annotation.IconVariant, annotation.IsHighlighted);
13 references to ResourceCommandSnapshot
Aspire.Hosting (11)
ApplicationModel\CustomResourceSnapshot.cs (1)
119
public ImmutableArray<
ResourceCommandSnapshot
> Commands { get; init; } = [];
ApplicationModel\ResourceNotificationService.cs (8)
613
ImmutableArray<
ResourceCommandSnapshot
>.Builder? builder = null;
617
var
existingCommand = FindByName(previousState.Commands, annotation.Name);
623
builder = ImmutableArray.CreateBuilder<
ResourceCommandSnapshot
>(previousState.Commands.Length);
639
builder = ImmutableArray.CreateBuilder<
ResourceCommandSnapshot
>(previousState.Commands.Length);
643
var
newCommand = existingCommand with
661
static
ResourceCommandSnapshot
? FindByName(ImmutableArray<
ResourceCommandSnapshot
> commands, string name)
674
static
ResourceCommandSnapshot
CreateCommandFromAnnotation(ResourceCommandAnnotation annotation, CustomResourceSnapshot previousState, IServiceProvider serviceProvider)
Dashboard\proto\Partials.cs (1)
88
foreach (
var
command in snapshot.Commands)
Dashboard\ResourceSnapshot.cs (1)
30
public required ImmutableArray<
ResourceCommandSnapshot
> Commands { get; init; }
Aspire.Hosting.Tests (2)
WithHttpCommandTests.cs (2)
387
var
commandSnapshot = resourceEvent.Snapshot.Commands.First(c => c.Name == "mycommand");
457
var
commandSnapshot = resourceEvent.Snapshot.Commands.First(c => c.Name == "mycommand");