4 instantiations of ResourceCommandSnapshot
Aspire.Hosting (1)
ApplicationModel\ResourceNotificationService.cs (1)
786
return 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)
121
new
ResourceCommandSnapshot
("start", ResourceCommandState.Enabled, "Start", "Start the resource", null, null, null, null, false),
122
new
ResourceCommandSnapshot
("stop", ResourceCommandState.Disabled, "Stop", "Stop the resource", null, null, null, null, false),
123
new
ResourceCommandSnapshot
("restart", ResourceCommandState.Hidden, "Restart", null, null, null, null, null, true)
11 references to ResourceCommandSnapshot
Aspire.Hosting (11)
ApplicationModel\CustomResourceSnapshot.cs (1)
119
public ImmutableArray<
ResourceCommandSnapshot
> Commands { get; init; } = [];
ApplicationModel\ResourceNotificationService.cs (8)
721
ImmutableArray<
ResourceCommandSnapshot
>.Builder? builder = null;
725
var
existingCommand = FindByName(previousState.Commands, annotation.Name);
731
builder = ImmutableArray.CreateBuilder<
ResourceCommandSnapshot
>(previousState.Commands.Length);
747
builder = ImmutableArray.CreateBuilder<
ResourceCommandSnapshot
>(previousState.Commands.Length);
751
var
newCommand = existingCommand with
769
static
ResourceCommandSnapshot
? FindByName(ImmutableArray<
ResourceCommandSnapshot
> commands, string name)
782
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; }