1 instantiation of ResourceCommandSnapshot
Aspire.Hosting (1)
ApplicationModel\ResourceNotificationService.cs (1)
677
return new
ResourceCommandSnapshot
(annotation.Name, state, annotation.DisplayName, annotation.DisplayDescription, annotation.Parameter, annotation.ConfirmationMessage, annotation.IconName, annotation.IconVariant, annotation.IsHighlighted);
11 references to ResourceCommandSnapshot
Aspire.Hosting (9)
ApplicationModel\CustomResourceSnapshot.cs (1)
119
public ImmutableArray<
ResourceCommandSnapshot
> Commands { get; init; } = [];
ApplicationModel\ResourceNotificationService.cs (8)
612
ImmutableArray<
ResourceCommandSnapshot
>.Builder? builder = null;
616
var
existingCommand = FindByName(previousState.Commands, annotation.Name);
622
builder = ImmutableArray.CreateBuilder<
ResourceCommandSnapshot
>(previousState.Commands.Length);
638
builder = ImmutableArray.CreateBuilder<
ResourceCommandSnapshot
>(previousState.Commands.Length);
642
var
newCommand = existingCommand with
660
static
ResourceCommandSnapshot
? FindByName(ImmutableArray<
ResourceCommandSnapshot
> commands, string name)
673
static
ResourceCommandSnapshot
CreateCommandFromAnnotation(ResourceCommandAnnotation annotation, CustomResourceSnapshot previousState, IServiceProvider serviceProvider)
Aspire.Hosting.Tests (2)
WithHttpCommandTests.cs (2)
373
var
commandSnapshot = resourceEvent.Snapshot.Commands.First(c => c.Name == "mycommand");
442
var
commandSnapshot = resourceEvent.Snapshot.Commands.First(c => c.Name == "mycommand");