1 write to Name
Aspire.Hosting (1)
ApplicationModel\ResourceCommandAnnotation.cs (1)
34
Name
= name;
28 references to Name
Aspire.Hosting (7)
ApplicationModel\ResourceCommandService.cs (2)
136
var annotation = resource.Annotations.OfType<ResourceCommandAnnotation>().SingleOrDefault(a => a.
Name
== commandName);
143
annotation = resource.Annotations.OfType<ResourceCommandAnnotation>().SingleOrDefault(a => a.
Name
== mappedName);
ApplicationModel\ResourceNotificationService.cs (2)
744
var existingCommand = FindByName(previousState.Commands, annotation.
Name
);
805
return new ResourceCommandSnapshot(annotation.
Name
, state, annotation.DisplayName, annotation.DisplayDescription, annotation.Parameter, annotation.ConfirmationMessage, annotation.IconName, annotation.IconVariant, annotation.IsHighlighted);
Orchestrator\ParameterProcessor.cs (1)
147
if (executionContext.IsRunMode && interactionService.IsAvailable && !parameterResource.Annotations.OfType<ResourceCommandAnnotation>().Any(a => a.
Name
== KnownResourceCommands.SetParameterCommand))
ResourceBuilderExtensions.cs (2)
2200
var existingAnnotation = builder.Resource.Annotations.OfType<ResourceCommandAnnotation>().SingleOrDefault(a => a.
Name
== name);
2265
var existingAnnotation = builder.Resource.Annotations.OfType<ResourceCommandAnnotation>().SingleOrDefault(a => a.
Name
== name);
Aspire.Hosting.Tests (21)
Dcp\DcpExecutorTests.cs (7)
2330
a => Assert.Equal(KnownResourceCommands.StartCommand, a.
Name
),
2331
a => Assert.Equal(KnownResourceCommands.StopCommand, a.
Name
),
2332
a => Assert.Equal(KnownResourceCommands.RestartCommand, a.
Name
));
2339
a => Assert.Equal(KnownResourceCommands.StartCommand, a.
Name
),
2340
a => Assert.Equal(KnownResourceCommands.StopCommand, a.
Name
),
2341
a => Assert.Equal(KnownResourceCommands.RestartCommand, a.
Name
),
2342
a => Assert.Equal(KnownResourceCommands.RebuildCommand, a.
Name
));
Orchestrator\ParameterProcessorTests.cs (2)
865
.SingleOrDefault(a => a.
Name
== KnownResourceCommands.SetParameterCommand);
885
.SingleOrDefault(a => a.
Name
== KnownResourceCommands.SetParameterCommand);
ResourceCommandAnnotationTests.cs (8)
56
var startCommand = resourceBuilder.Resource.Annotations.OfType<ResourceCommandAnnotation>().Single(a => a.
Name
== commandName);
83
var restartCommand = resourceBuilder.Resource.Annotations.OfType<ResourceCommandAnnotation>().Single(a => a.
Name
== KnownResourceCommands.RestartCommand);
98
var restartCommand = projectResource.Annotations.OfType<ResourceCommandAnnotation>().Single(a => a.
Name
== KnownResourceCommands.RestartCommand);
113
var restartCommand = csharpAppResource.Annotations.OfType<ResourceCommandAnnotation>().Single(a => a.
Name
== KnownResourceCommands.RestartCommand);
137
var rebuildCommand = projectResource.Annotations.OfType<ResourceCommandAnnotation>().Single(a => a.
Name
== commandName);
164
Assert.DoesNotContain(containerResource.Resource.Annotations.OfType<ResourceCommandAnnotation>(), a => a.
Name
== KnownResourceCommands.RebuildCommand);
165
Assert.Contains(projectResource.Annotations.OfType<ResourceCommandAnnotation>(), a => a.
Name
== KnownResourceCommands.RebuildCommand);
174
var rebuildCommand = projectResource.Annotations.OfType<ResourceCommandAnnotation>().Single(a => a.
Name
== KnownResourceCommands.RebuildCommand);
WithHttpCommandTests.cs (4)
97
Assert.Equal($"{resourceBuilder.Resource.Name}-http-http-post-/some-path", command.
Name
);
129
Assert.Equal("my-command-name", command.
Name
);
156
var command2 = commands.FirstOrDefault(c => c.DisplayName == "Do The Thing" && c.
Name
.Contains("custom-endpoint"));
158
var command4 = commands.FirstOrDefault(c => c.DisplayName == "Do The Get Thing" && c.
Name
.Contains("custom-endpoint"));