4 instantiations of ResourceCommandSnapshot
Aspire.Hosting (1)
ApplicationModel\ResourceNotificationService.cs (1)
805
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)
740
ImmutableArray<
ResourceCommandSnapshot
>.Builder? builder = null;
744
var
existingCommand = FindByName(previousState.Commands, annotation.Name);
750
builder = ImmutableArray.CreateBuilder<
ResourceCommandSnapshot
>(previousState.Commands.Length);
766
builder = ImmutableArray.CreateBuilder<
ResourceCommandSnapshot
>(previousState.Commands.Length);
770
var
newCommand = existingCommand with
788
static
ResourceCommandSnapshot
? FindByName(ImmutableArray<
ResourceCommandSnapshot
> commands, string name)
801
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; }