1 write to Name
Aspire.Hosting (1)
ApplicationModel\ResourceCommandAnnotation.cs (1)
34Name = name;
16 references to Name
Aspire.Hosting (6)
ApplicationModel\ResourceCommandService.cs (1)
126var annotation = resource.Annotations.OfType<ResourceCommandAnnotation>().SingleOrDefault(a => a.Name == commandName);
ApplicationModel\ResourceNotificationService.cs (2)
725var existingCommand = FindByName(previousState.Commands, annotation.Name); 786return new ResourceCommandSnapshot(annotation.Name, state, annotation.DisplayName, annotation.DisplayDescription, annotation.Parameter, annotation.ConfirmationMessage, annotation.IconName, annotation.IconVariant, annotation.IsHighlighted);
Orchestrator\ParameterProcessor.cs (1)
147if (executionContext.IsRunMode && interactionService.IsAvailable && !parameterResource.Annotations.OfType<ResourceCommandAnnotation>().Any(a => a.Name == KnownResourceCommands.SetParameterCommand))
ResourceBuilderExtensions.cs (2)
2005var existingAnnotation = builder.Resource.Annotations.OfType<ResourceCommandAnnotation>().SingleOrDefault(a => a.Name == name); 2070var existingAnnotation = builder.Resource.Annotations.OfType<ResourceCommandAnnotation>().SingleOrDefault(a => a.Name == name);
Aspire.Hosting.Tests (10)
Dcp\DcpExecutorTests.cs (3)
2182a => Assert.Equal(KnownResourceCommands.StartCommand, a.Name), 2183a => Assert.Equal(KnownResourceCommands.StopCommand, a.Name), 2184a => Assert.Equal(KnownResourceCommands.RestartCommand, a.Name));
Orchestrator\ParameterProcessorTests.cs (2)
864.SingleOrDefault(a => a.Name == KnownResourceCommands.SetParameterCommand); 884.SingleOrDefault(a => a.Name == KnownResourceCommands.SetParameterCommand);
ResourceCommandAnnotationTests.cs (1)
51var startCommand = resourceBuilder.Resource.Annotations.OfType<ResourceCommandAnnotation>().Single(a => a.Name == commandName);
WithHttpCommandTests.cs (4)
97Assert.Equal($"{resourceBuilder.Resource.Name}-http-http-post-/some-path", command.Name); 129Assert.Equal("my-command-name", command.Name); 156var command2 = commands.FirstOrDefault(c => c.DisplayName == "Do The Thing" && c.Name.Contains("custom-endpoint")); 158var command4 = commands.FirstOrDefault(c => c.DisplayName == "Do The Get Thing" && c.Name.Contains("custom-endpoint"));