1 instantiation of ResourceCommandSnapshot
Aspire.Hosting (1)
ApplicationModel\ResourceNotificationService.cs (1)
739
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)
674
ImmutableArray<
ResourceCommandSnapshot
>.Builder? builder = null;
678
var
existingCommand = FindByName(previousState.Commands, annotation.Name);
684
builder = ImmutableArray.CreateBuilder<
ResourceCommandSnapshot
>(previousState.Commands.Length);
700
builder = ImmutableArray.CreateBuilder<
ResourceCommandSnapshot
>(previousState.Commands.Length);
704
var
newCommand = existingCommand with
722
static
ResourceCommandSnapshot
? FindByName(ImmutableArray<
ResourceCommandSnapshot
> commands, string name)
735
static
ResourceCommandSnapshot
CreateCommandFromAnnotation(ResourceCommandAnnotation annotation, CustomResourceSnapshot previousState, IServiceProvider serviceProvider)
Dashboard\proto\Partials.cs (1)
98
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)
386
var
commandSnapshot = resourceEvent.Snapshot.Commands.First(c => c.Name == "mycommand");
456
var
commandSnapshot = resourceEvent.Snapshot.Commands.First(c => c.Name == "mycommand");